Closed dtinth closed 3 years ago
Bump
@sindresorhus Thank you for the bump. I updated the PR with updated text.
We should probably also mention that
mem
has more options.
I might miss something here, but p-memoize
’s options is extended from mem
’s options. So technically p-memoize
accepts more options than mem
.
So mem is good for normal functions and p-memoize is meant for async operations.
I was thinking about adding “Do not use p-memoize
to memoize non-async functions; use mem instead.” but maybe that makes it too verbose?
The package
mem
andp-memoize
looks so similar, so I wonder what is the difference (i.e. why two packages? why I shouldn't we just use mem?) so I looked into the implementation. This PR documents the difference.