pal

Embedded write-once key-value database

Usage no npm install needed!

<script type="module">
  import pal from 'https://cdn.skypack.dev/pal';
</script>

README

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'