ImStore
Immutable javascript in-memory store
Why?
Because of this
// mutable in-memory storevar store = ; var key = 'xxx';var value = a: 'b' cd: 1 23; // save to memorystore; var getValue = store;getValuea = 'b';getValuecd = ;getValuec = 2 console;// {a: ['b'], cd: [], c: 2}// WHOOPS storage updated itself!
Usage
Install via npm
$ npm install imstore
API is simple and straightforward:
var imstore = ;var store = ; // saving valuestore;// orstore; // get valuestore; // clear some datastore; // get all available keysstore; // clear all data in memorystoreclear;// orstore;// orstore;
License
MIT