All Versions
12
Latest Version
Avg Release Cycle
72 days
Latest Release
11 days ago
Changelog History
Page 1
Changelog History
Page 1
-
v6.0.0
November 11, 2019💥 Breaking
- 0️⃣ Simplify the default
cacheKey
(#43) b7a0766
👀 It now defaults tocacheKey: x => x
instead of the much more complicated previous default. This means it will now only cache the first argument, and only if it's a primitive. Previously, it tried to cache all arguments usingJSON.stringify()
, but this was both error-prone and slow. This change makes the memoization logic very straightforward, explicit and fast by default. See the readme for how to handle multi-argument or non-primitive value situations. - ⬇️ Drop the
cachePromiseRejection
option (#43) b7a0766
It was not a good fit formem
and we plan to add it top-memoize
instead (sindresorhus/p-memoize#11), which is likemem
, but focused on promises. If you depend on this option, you should stay on mem v5 until sindresorhus/p-memoize#11 is resolved. - Throw when
.clear()
is called with a non-memoized function (#44) c73c23b
- 0️⃣ Simplify the default
-
v5.1.0
June 15, 2019 -
v5.0.0
May 17, 2019💥 Breaking:
- Require Node.js 8 e54b59b
- 🔄 Change the default value of the
cachePromiseRejection
option totrue
(#36) 70707ae
0️⃣ We decided it's better to default to the least surprising/magic behavior.
💥 Breaking for TypeScript users:
- Only use a CommonJS export for the TypeScript definition
You need to changeimport mem from 'mem';
toimport mem = require('mem');
✨ Enhancements:
-
v4.2.0
March 12, 2019 -
v4.0.0
August 27, 2018 -
v3.0.1
June 20, 2018