@tpaul/localstorage-json
v1.0.0
Published
Simply adds setJSON and getJSON methods to node-localstorage.
Downloads
3
Readme
LocalStorage(+JSON)
A simple wrapper that adds convenience setJSON
and getJSON
methods
to node-localstorage
Makes for a very quick and convenient key value store for testing and other lightweight tasks.
Usage:
const LocalStorage = require('json-localstorage');
const storage = new LocalStorage(`${__dirname}/var`);
const hovercraft = {
isFullOfEels: true
};
storage.setJSON('myCraft', hovercraft);
console.log(storage.getJSON('myCraft'));