Interact with json object like a database
$ npm install smaki
var Smaki = require('smaki');
var json = {
"a": 1,
"b": 2
};
var smaki = new Smaki(json);
Compress and minify the json:
smaki.compress();
// => a|b^1|2^^$0|2|1|3]
Uncompress a minified json:
smaki.uncompress();
Get value:
smaki.get(key);
Get objects:
smaki.getObjects([key], [value], [objects]);
Get paths:
smaki.getObjects([key], [val], [obj], [stringify], [path]);
Get values:
smaki.getValues(key, [obj]);
Get keys:
smaki.getKeys(value, [obj]);
Delete objects:
smaki.deleteObject(key, [value], [obj]);
Update objects:
smaki.updateObject(key, value, [oldValue], [obj]);
MIT
Marcos Sanz Latorre copyright 2116 marcos.sanz@13genius.com