simple-memoize

1.0.2 • Public • Published

simple-memoize

Memoizes a node-style asynchronous function. Does not memoize the errors.

Handles non-string keys.

Use

var memoize = require('simple-memoize');

var fn = function(arg1, arg2, cb) {
};

var memofunc = memoize(fn);

memofunc('hello', {prop: 'world'}, function (err, val) {
    console.log(err, val);
});

Dependencies (1)

Dev Dependencies (1)

Package Sidebar

Install

npm i simple-memoize

Weekly Downloads

2

Version

1.0.2

License

ISC

Last publish

Collaborators

  • aredridel