README.md

Memoize Immutable

An efficient memoizer for functions that only receive immutable arguments. Ideal for Redux and similar environments, works with Immutable.js values.

This lib is only compatible with browsers and environments that implement WeakMap and Map natively (see compatibility table).

How is it different from other memoizers?

In order to index cached results, most memoizers serialize arguments using JSON.stringify or similar methods.
When working with immutable data, using a WeakMap based cache is much more CPU and memory efficient.
This memoizer is designed to work with such caches.

Install

npm install --save memoize-immutable

Optionally, you can install alternative caches to be used with this memoizer: