Skip to content

Releases: sindresorhus/p-memoize

v7.1.1

07 Oct 09:16
Compare
Choose a tag to compare
  • Add missing dependency when used with TypeScript 00faae0

v7.1.0...v7.1.1

v7.1.0

05 Jul 21:08
Compare
Choose a tag to compare

v7.0.0...v7.1.0

v7.0.0

03 Jul 13:17
Compare
Choose a tag to compare

Breaking

Improvements

  • Allow .set() method used in the cache option to be async (#48) 7a82e0f
  • Synchronously cache pending promises (#48) 7a82e0f

v6.0.2...v7.0.0

v6.0.2

11 Jun 10:29
Compare
Choose a tag to compare

v6.0.1...v6.0.2

v4.0.4

03 Jan 16:32
Compare
Choose a tag to compare
  • Follow-up fix to backport in 4.0.3.

v4.0.3...v4.0.4

v4.0.3

14 Nov 16:32
Compare
Choose a tag to compare

v4.0.2...v4.0.3

v6.0.1

16 Oct 08:29
Compare
Choose a tag to compare
  • Only use internal promise cache if a value already exists in cache (#32) 873390d

v6.0.0...v6.0.1

v6.0.0

13 Oct 09:53
Compare
Choose a tag to compare

Breaking

  • Remove maxAge option 19b418e
    • For a custom 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.
    • How to preserve max age functionality.

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 custom cache will be provided the values of resolved promises instead of the promises themselves.

v5.0.1...v6.0.0

v5.0.1

05 Oct 12:51
Compare
Choose a tag to compare
  • Fix TypeScript type of optional custom cache (#27) 733e324

v5.0.0...v5.0.1

v5.0.0

19 Sep 08:13
Compare
Choose a tag to compare

Breaking

  • Require Node.js 12.20 d95278e
  • This package is now pure ESM. Please read this.
  • pMemoize.clear() is now a named export called pMemoizeClear

Fixes

v4.0.2...v5.0.0