Closed jdiamond closed 4 years ago
Do you still want to support Node.js 6? I can use Object.assign()
instead of the object spread operator. I was trying not to mutate the options
argument that gets passed in.
Do you still want to support Node.js 6?
No, fixed: https://github.com/sindresorhus/p-memoize/commit/d11b692353b196827cb8978672bda2a32386c2f8
Update to address your comments. Let me know if you'd rather I rebase/squash instead of merge.
This looks good. Thank you 👍
Hello, here is my attempt at adding the
cachePromiseRejection
option removed from mem.I think the default should be false because rejected promises are like exceptions and an exception thrown from a function memoized with mem doesn't cache anything.
I used the same name that was used in mem, but it sounds awkward to me and wonder if
cacheRejectedPromises
might be more natural.Fixes #11