Memoize promise-returning & async functions
MIT License
Bot releases are hidden (Show)
https://github.com/sindresorhus/p-memoize/compare/v7.1.0...v7.1.1
https://github.com/sindresorhus/p-memoize/compare/v7.0.0...v7.1.0
cachePromiseRejection
option (#48) 7a82e0f
.set()
method used in the cache
option to be async (#48) 7a82e0fhttps://github.com/sindresorhus/p-memoize/compare/v6.0.2...v7.0.0
https://github.com/sindresorhus/p-memoize/compare/v6.0.1...v6.0.2
https://github.com/sindresorhus/p-memoize/compare/v4.0.3...v4.0.4
cache
(#32) 873390dhttps://github.com/sindresorhus/p-memoize/compare/v6.0.0...v6.0.1
maxAge
option 19b418e
cache
, this means instead of .set()
being provided an object with the properties value
and maxAge
, it will only be provided value
as the first argument..get()
and .has()
cache methodscache
. The promise cache does not persist outside of the current instance and properties assigned to a returned promise will not be kept. The custom cache
will be provided the values of resolved promises instead of the promises themselves.https://github.com/sindresorhus/p-memoize/compare/v5.0.1...v6.0.0
https://github.com/sindresorhus/p-memoize/compare/v5.0.0...v5.0.1
pMemoize.clear()
is now a named export called pMemoizeClear
https://github.com/sindresorhus/p-memoize/compare/v4.0.2...v5.0.0
maxAge
to start on Promise settlement (#24) 49a4db9https://github.com/sindresorhus/p-memoize/compare/v4.0.1...v4.0.2
https://github.com/sindresorhus/p-memoize/compare/v4.0.0...v4.0.1
import pMemoize from 'p-memoize';
to import pMemoize = require('p-memoize');
cachePromiseRejection
option (#13) cca1cf6https://github.com/sindresorhus/p-memoize/compare/v3.1.0...v4.0.0
https://github.com/sindresorhus/p-memoize/compare/v3.0.0...v3.1.0
Breaking:
.clear()
method now throws if you try to clear non-memoized functions (#7) eb5829fEnhancements:
https://github.com/sindresorhus/p-memoize/compare/v2.1.0...v3.0.0