Socket
Book a DemoInstallSign in
Socket

level-value

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

level-value

Subscribe to a LevelDB value

latest
Source
npmnpm
Version
1.1.2
Version published
Maintainers
1
Created
Source

level-value

Subscribe to a leveldb value.

  • exposes put, batch and del changes through one unified interface
  • accepts RegExps
  • performs an initial get for the value (except with RegExp)

Usage

const subscribe = require('level-value')

subscribe(db, 'key', value => {
  console.log(value)  
}).off()

// Alternative EventEmitter API

const sub = subscribe(db, 'key')
sub.on('value', console.log)
sub.off()

Install

$ npm install level-value

API

subscribe(db, key[, fn])

#on('value', fn)

#off()

License

MIT

FAQs

Package last updated on 23 Oct 2017

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