0.0.10 • Published 3 years ago
@nlibs/kvlite v0.0.10
kvlite
kvlite is an in-memory key value store with an sqlite backend.
Installation
npm install kvlite
API
kvlite has 3 call
- constructor(path: string, oncomplete)
- get(key: string, oncomplete(value: string)=>void);
- set(key: string, value: string);
Example
var KVLITE = require("kvlite");
var db = new KVLITE.kv("path");
db.set("key", "value");
db.get("key", function(value)
{
if (typeof value == 'undefined')
{
// key not found
}
});