Releases: sindresorhus/p-memoize
Releases Β· sindresorhus/p-memoize
v7.1.1
- Add missing dependency when used with TypeScript 00faae0
v7.1.0
v7.0.0
v6.0.2
v4.0.4
- Follow-up fix to backport in 4.0.3.
v4.0.3
- Backport 343ac6e from v5.
v6.0.1
v6.0.0
Breaking
- Remove
maxAge
option 19b418e- For a custom
cache
, this means instead of.set()
being provided an object with the propertiesvalue
andmaxAge
, it will only be providedvalue
as the first argument. - How to preserve max age functionality.
- For a custom
Improvements
- The custom cache can now be async by returning a promise in the
.get()
and.has()
cache methods - Promises returned from a memoized function will be cached internally and take priority over
cache
. The promise cache does not persist outside of the current instance and properties assigned to a returned promise will not be kept. The customcache
will be provided the values of resolved promises instead of the promises themselves.