A memoizer factory for Intl format constructors (Intl.NumberFormat, Intl.DateTimeFormat, IntlMessageFormat, IntlRelativeFormat). Current version 4.3.1, part of the FormatJS suite. Creates cache keys via JSON.stringify of arguments, including ordered options keys. Benchmark shows competitive performance vs fast-memoize, especially on get operations. Intended to be used internally by FormatJS packages; direct use may be redundant if using @formatjs/intl. Ships TypeScript declarations. Stable but low churn.
npm install intl-format-cacheNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Demonstrates memoizing Intl.NumberFormat constructor and reusing cached instances for same locale.
Consider using @formatjs/intl which provides built-in memoization.
Ensure options objects have stable key order and no undefined values.
Only pass Intl.NumberFormat, Intl.DateTimeFormat, etc. or other constructors.
Do not mutate the returned format instance; treat it as immutable.
Use default import: import memoizeFormatConstructor from 'intl-format-cache'
Pass Intl.NumberFormat or similar constructor, not a regular function.
No dependency data recorded yet.