eyros 4.6.2

multi-dimensional interval database
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
var api = require('./lib/5d-api.js')
var wrapStorage = require('./lib/wrap-storage.js')
var setWasm = require('./lib/set-wasm.js')

module.exports = function (opts) {
  if (!opts.storage) throw new Error('opts.storage not provided')
  return setWasm(api, opts).then(function (r) {
    if (typeof opts.getId === 'function') {
      api.set_getid(opts.getId)
    }
    return api.open_f32_f32_f32_f32_f32(Object.assign({}, opts, {
      storage: wrapStorage(opts.storage),
      remove: opts.remove || function () {}
    }))
  })
}