Socket
Book a DemoInstallSign in
Socket

level-count

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

level-count

Count the KV pairs in a range, with live mode

latest
Source
npmnpm
Version
1.0.0
Version published
Maintainers
1
Created
Source

level-count

Count the KV pairs in a leveldb range, with optional live mode.

Usage

Count once:

count(db, { gt: 'prefix' }, (err, c) => {
  // ...
})

Count continuously:

const counts = count.live(db, { gt: 'prefix' })
counts.on('value', c => {
  // ...
})
const c = counts.get()

Installation

$ npm install level-count

API

count(db[, opts], cb)

counts = count(db[, opts])

counts.get()

counts.on('count', fn)

counts.destroy()

License

MIT

FAQs

Package last updated on 27 Nov 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