js-data-cache

1.2.0 • Public • Published

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);

Readme

Keywords

none

Package Sidebar

Install

npm i js-data-cache

Weekly Downloads

4

Version

1.2.0

License

MIT

Last publish

Collaborators

  • codyjdalton