Socket
Book a DemoInstallSign in
Socket

changesdown

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

changesdown

levelup that uses a leveldown that writes to a changes feed to store its state

Source
npmnpm
Version
2.2.2
Version published
Weekly downloads
6
-57.14%
Maintainers
1
Weekly downloads
 
Created
Source

changesdown

levelup that uses a leveldown that writes to a changes feed to store its state

npm install changesdown

build status

Usage

var changesdown = require('changesdown')
var changes = require('changes-feed')
var level = require('level')

var feed = changes(level('changes'))
var db = changesdown(level('db'), feed)

db.put('hello', 'world', function() {
  db.get('hello', function(err, value) {
    console.log(value) // should print world
  })
})

feed.createReadStream({live:true})
  .on('data', function(data) {
    console.log('change:', changesdown.decode(data.value)) // should print some changes
  })

API

db = changesdown(levelup, changesFeed, [options])

Returns a new levelup (db) that reads and writes from the changes feed. The levelup you pass in is used to store a view of the feed.

Any options passed will be forwarded to the levelup constructor.

License

MIT

FAQs

Package last updated on 31 Jan 2015

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