diff options
author | Parsha Pourkhomami <parshap+git@gmail.com> | 2012-09-01 12:39:51 -0700 |
---|---|---|
committer | Parsha Pourkhomami <parshap+git@gmail.com> | 2012-09-01 12:39:51 -0700 |
commit | 34057992c88d7264793becaaf2f2944595c7ea27 (patch) | |
tree | 0497524cbcf8c0855ff39102b484b66327b6d69a | |
parent | 8696792b5d60b1a24daef09b522a0bfcb7bd3c2f (diff) | |
download | async-34057992c88d7264793becaaf2f2944595c7ea27.tar.gz |
Expose memoized function's memos
Add a `memo` property to the return value of `async.memoize` (the
memoized function) to expose the collection of already-calculated
values.
-rw-r--r-- | lib/async.js | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/async.js b/lib/async.js index 7cc4f5e..b708bc9 100644 --- a/lib/async.js +++ b/lib/async.js @@ -679,6 +679,7 @@ }])); } }; + memoized.memo = memo; memoized.unmemoized = fn; return memoized; }; |