Socket
Book a DemoInstallSign in
Socket

lean

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

lean

A super simple and fast in-memory data store. For when couch and other nosql solutions are more than you need.

latest
Source
npmnpm
Version
0.1.1
Version published
Maintainers
1
Created
Source

Lean

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

API

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) {
    console.log(id);
});

// 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

FAQs

Package last updated on 28 Oct 2011

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