0.0.10 • Published 5 years ago
@nlibs/kvlite
Licence
MIT
Version
0.0.10
Deps
1
Size
4 kB
Vulns
0
Weekly
0
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
}
});