An open API service indexing awesome lists of open source software.

https://github.com/adrienjoly/npm-mymoize

Memoization for standard async functions: function fn(callback){ callback(err, res); }; mymoize(fn)() => {getRes(), getErr()}
https://github.com/adrienjoly/npm-mymoize

helper javascript memoization minimal npm-package snippets

Last synced: 7 months ago
JSON representation

Memoization for standard async functions: function fn(callback){ callback(err, res); }; mymoize(fn)() => {getRes(), getErr()}

Awesome Lists containing this project

README

          

# npm-mymoize
Memoization for standard asynchronous functions which callback(err, res).

```javascript
function fn(callback) {
var err = null;
var res = {ok: 1};
callback(err, res);
};
var mymoized = mymoize(fn);
mymoized();
mymoized.getErr(); // => null
mymoized.getRes(); // => {ok: 1}
```