Skip to content

v5.1.1

Latest
Compare
Choose a tag to compare
@markerikson markerikson released this 01 Jun 22:22
· 39 commits to master since this release

This patch release fixes behavior of resultEqualityCheck in weakMapMemoize, fixes the case of lruMemoize being given a maxSize less than 1, and tweaks the internal implementation of lruMemoize. (We've also updated our general build tooling.)

Changelog

Bug fixes

Previously, providing the resultEqualityCheck option to weakMapMemoize resulted in it being called with empty objects as part of the initialization / dev check process. That could be an issue if your comparison function expected different values. We've updated the logic to avoid that, as well as improving a couple other perf aspects.

Previously, passing a maxSize < 1 to lruMemoize would result in it creating a larger cache. That's now fixed.

lruMemoize now uses a symbol for its NOT_FOUND value instead of a string.

What's Changed

Full Changelog: v5.1.0...v5.1.1