Simple data caching for Javascript
$ npm install js-data-cache --save
// include default response
var cache = require('js-data-cache');
var customer;
var data = [
{
id: 'test-uuid-1',
name: 'John Smith'
},
{
id: 'test-uuid-2',
name: 'George Miller'
}
];
cache.set(data, [ 'id' ]);
customer = cache.get('id', 'test-uuid-1');
console.log(customer);