npm.io
0.3.4 • Published 11 years ago

pal

Licence
MIT
Version
0.3.4
Deps
3
Vulns
2
Weekly
0
Stars
1
Install scriptsThis package runs scripts during installation (preinstall/install/postinstall)

Pal NPM version Build status

Key-value database inspired by PalDB.

Installation

$ npm install pal

pal is compatible with all node.js versions above 2.0.

Documentation

Examples

var pal = require('pal');
  • Create a database:

    var ws = pal.Db.createWriteStream('sample.pal')
    ws.write({key: 12, value: 'twelve'})
    ws.write({key: 48, value: 'forty-eight'})
    ws.end();
  • Load a database and retrieve values:

    var db = new pal.Db('sample.pal');
    var str = db.get(48); // 'forty-eight'