js-data-cache
v1.2.0
Published
Easy data caching and lookup
Downloads
1
Readme
Data Cache
Simple data caching for Javascript
Installation
$ npm install js-data-cache --save
Usage
// 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);