Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

level-peek

Package Overview
Dependencies
Maintainers
1
Versions
9
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

level-peek

peek the first or last record in a leveldb range.

  • 1.0.6
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

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

FAQs

Package last updated on 01 Apr 2013

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc