Changelog
6.0.2
fast-equals
in particular to prevent surfacing of an issue it faced)Changelog
6.0.0
BREAKING CHANGES
moize
v5 and below had a default cache size of Infinity
, however starting with v6 the default cache size will be 1
. If you want to maintain a cache history of multiple entries, it is recommended to use moize.maxSize
to set the size of history desired. To replicate usage from v5 and below, use moize.infinite
.isReact
option and moize.react
shorthand method now memoizes on a per-instance basis (previously shared cache across all instances).moize.simple
and moize.reactSimple
have been removed due to default cache size being 1.isSerialized
option and moize.serialize
shorthand method will now serialize functions by default.shouldSerializeFunctions
option has been removed, as serializing functions is now the default.equals
option has been renamed to matchesArg
for alignment with matchesKey
.ENHANCEMENTS
isShallowEqual
(compares each arg in the key
based on shallow equality)updateCacheForKey
(if truthy value returned, will update the cached value for the given key
)moize.infinite
(shorthand for maxSize
option set to Infinity
)moize.matchesArg
(shorthand for matchesArg
option)moize.matchesKey
(shorthand for matchesKey
option)moize.serializeWith
(shorthand for isSerialized
and serializer
option)moize.shallow
(shorthand for isShallowEqual
option)moize.transformArgs
(shorthand for transformArgs
option)moize.updateCacheForKey
(shorthand for updateCacheForKey
option)INTERNALS
jest