diff options
author | Alexander Early <alexander.early@gmail.com> | 2015-05-19 15:18:27 -0700 |
---|---|---|
committer | Alexander Early <alexander.early@gmail.com> | 2015-05-19 15:18:27 -0700 |
commit | fadd2078daf1757cb65466a787926501093d74d7 (patch) | |
tree | 0e7cf397b11076f30fabb9c5aea252804cd9c557 | |
parent | 8a7fb2b9259d2b57a4a1f83ec4ef292127b2938a (diff) | |
parent | cdddd3491461e479ab4f70c8f99df216b52f100d (diff) | |
download | async-fadd2078daf1757cb65466a787926501093d74d7.tar.gz |
Merge pull request #631 from boutell/master
Document behavior of the default hash function of async.memoize
-rw-r--r-- | README.md | 2 |
1 files changed, 2 insertions, 0 deletions
@@ -1612,6 +1612,8 @@ Caches the results of an `async` function. When creating a hash to store functio results against, the callback is omitted from the hash and an optional hash function can be used. +If no hash function is specified, the first argument is used as a hash key, which may work reasonably if it is a string or a data type that converts to a distinct string. Note that objects and arrays will not behave reasonably. Neither will cases where the other arguments are significant. In such cases, specify your own hash function. + The cache of results is exposed as the `memo` property of the function returned by `memoize`. |