Skip to content

Commit

Permalink
Expose memoized function's memos
Browse files Browse the repository at this point in the history
Add a `memo` property to the return value of `async.memoize` (the
memoized function) to expose the collection of already-calculated
values.
  • Loading branch information
parshap committed Sep 1, 2012
1 parent 8696792 commit 3405799
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions lib/async.js
Expand Up @@ -679,6 +679,7 @@
}])); }]));
} }
}; };
memoized.memo = memo;
memoized.unmemoized = fn; memoized.unmemoized = fn;
return memoized; return memoized;
}; };
Expand Down

0 comments on commit 3405799

Please sign in to comment.