smartKeyNormalizer<T>(): KeyNormalizer<T>
Initializes a smart normalizer for memoization caches that need to stringify keys.
Uses JSON.stringify with custom support for common types. Supports BigInt, Uint8Array, ArrayBuffer, Map, and Set.
Function memoization with strong types.
smartKeyNormalizer<T>(): KeyNormalizer<T>
Initializes a smart normalizer for memoization caches that need to stringify keys.
Uses JSON.stringify with custom support for common types. Supports BigInt, Uint8Array, ArrayBuffer, Map, and Set.
Add Package
deno add @mega/memoize
Import symbol
import { smartKeyNormalizer } from "@mega/memoize/utils/keyNormalizer";
---- OR ----
Import directly with a jsr specifier
import { smartKeyNormalizer } from "jsr:@mega/memoize/utils/keyNormalizer";
Add Package
npx jsr add @mega/memoize
Import symbol
import { smartKeyNormalizer } from "@mega/memoize/utils/keyNormalizer";
Add Package
yarn dlx jsr add @mega/memoize
Import symbol
import { smartKeyNormalizer } from "@mega/memoize/utils/keyNormalizer";
Add Package
pnpm dlx jsr add @mega/memoize
Import symbol
import { smartKeyNormalizer } from "@mega/memoize/utils/keyNormalizer";
Add Package
bunx jsr add @mega/memoize
Import symbol
import { smartKeyNormalizer } from "@mega/memoize/utils/keyNormalizer";