New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

logbase

Package Overview
Dependencies
Maintainers
2
Versions
29
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

logbase

log and log-based database based on changes-feed

  • 4.0.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
18
decreased by-47.06%
Maintainers
2
Weekly downloads
 
Created
Source

logbase

Append-only log and log-based database

this module is used by Tradle

NPM

Usage


var lb = require('logbase')
var log = new lb.Log('path/to/db', {
  db: leveldown
})

var red = new lb.Entry()
  .set({
    name: 'roxie',
    color: 'red'
  })
  
// change color
var blue = new lb.Entry()
  .set({
    name: 'roxie',
    color: 'blue'
  })

log.append(red)
log.append(blue)

// stores latest colors
var db = new lb.Base({
  log: log,
  db: levelup('path/to/another/db', { 
    db: leveldown,
    valueEncoding: 'utf8'
  })
})

db._process = function (entry, cb) {
  this._db.put(entry.get('name'), entry.get('color'), cb)
}

TODO

Remove/isolate all "write" methods

Keywords

FAQs

Package last updated on 27 May 2016

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