Skip to content

Memoize the result of async functions for node and component

Notifications You must be signed in to change notification settings

segment-boneyard/memoize-async

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

memoize-async

Memoize the results of async functions

Installation

$ component install segmentio/memoize-async

API

var memoize = require('..');

User.get = memoize(User.get);

User.get('[email protected]', function (err, user) {
  // do some stuff
});

// ... later we will immediately get the user

User.get('[email protected]', function (err, user) {

});

License

MIT

About

Memoize the result of async functions for node and component

Resources

Stars

Watchers

Forks

Packages

No packages published