node package manager
Share your code. npm Orgs help your team discover, share, and reuse code. Create a free org ยป



An in-memory data store with a simple API. For when Couch and other nosql solutions are way more than you need.


var Lean = reqire('lean');

var DB = new Lean();

DB.set('a.b', { c: 1, d: 2 });

var size = DB.length; // 1

var value = DB.get('a.b');

DB.forEach(function(data, id, i) {

// Query looks for all keys with that value
// If more than one key is provided it is an AND search
var rockandroll = DB.query({ sex: true, drugs: true });

//Express templating prefers data in arrays
var array = DB.toArray();

Built-in Test

$ nodenunit test