git ssb

0+

Dominic / flumeview-level



Branch:
Claes Wallin (韋嘉誠) committed ssb-npm: announce ssb repoLatest: fbcfe14 on 4/9/2018, 7:14:54 PM
📄.gitignore
📄.travis.yml
📄LICENSE
📄README.md
📄index.js
📄package-lock.json
📄package.json
📁test
README.md

flumeview-level

A flumeview implemented on top of level.

Provides indexes which are persistent and can be streamed in order.

example

var ViewLevel = require('flumeview-level')

flumedb.use(name, ViewLevel(1, function (value) {
  return [data.foo] // must return an array
}))

flumedb.append({foo: 'bar'}, function (err) {
  if(err) throw err

  //query items from the index directly
  flumedb[name].get('bar', function (err, value) {
    if(err) throw err
    console.log(value) // => {foo: 'bar'})
  })

  //or query ranges via pull-streams
  pull(
    flumedb[name].read({gte: 'bar', live: true}),
    ...
  )

})

License

MIT

Built with git-ssb-web