New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

node-lsm

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

node-lsm

log structured merge tree in pure node.js

latest
npmnpm
Version
1.0.0
Version published
Weekly downloads
7
-12.5%
Maintainers
1
Weekly downloads
 
Created
Source

WIP

Build Status

LSM, a log-structured-merge-tree, implemented in node.js.

var lsm = Subject('/tmp/example', {
    threshold : 1000 //optional
});

lsm.open().then(function(){
    return lsm.put('#12345', 'hello');
}).then(function(){
    return lsm.get('#12345');
}).then(function(result){
    console.log('result', result); // hello
});

everything is just line separated json!

cat /tmp/example/log-00000001.json

contains this.

{"key":"hello","value":"HI","type":"put"}
{"key":"what","value":"WHO","type":"put"}

put more data in there and you'll get SST files.

Features

  • PUT string key/value
  • GET string key/value
  • DEL string key/value

TODO

  • Support multiple lsm's opened pointing to the same data folder.
  • All operations promisify

FAQs

Package last updated on 28 Apr 2019

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