Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
JavaScript
branch: master

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
test
.gitignore
.travis.yml
LICENSE
README.md
index.js
package.json

README.md

level-peek

peek the first or last record in a leveldb range.

example

var levelup = require('levelup')
var db = levelup(PATH_TO_DB)

var peek = require('level-peek')

//get the first value, 'a' or after
peek.first(db, {start: 'a'}, function (err, key, value) {
  console.log(key, value)
})

//get last value, 'z' or before.
peek.last(db, {end: 'z'}, function (err, key, value) {
  console.log(key, value)
})

see also, level-fix-range and https://github.com/rvagg/node-levelup/issues/110

License

MIT

Something went wrong with that request. Please try again.