Skip to main content

Function memoization with strong types.

This package works with Cloudflare Workers, Node.js, Deno, Bun, Browsers
This package works with Cloudflare Workers
This package works with Node.js
This package works with Deno
This package works with Bun
This package works with Browsers
JSR Score
94%
Published
3 months ago (0.1.0)
type alias KeyNormalizer

Normalizer function for memoization caches that need to stringify keys.

Type Parameters

Definition

(
this: void,
key: T,
) => string

Add Package

deno add jsr:@mega/memoize

Import symbol

import { type KeyNormalizer } from "@mega/memoize/utils/keyNormalizer";

---- OR ----

Import directly with a jsr specifier

import { type KeyNormalizer } from "jsr:@mega/memoize/utils/keyNormalizer";

Add Package

npx jsr add @mega/memoize

Import symbol

import { type KeyNormalizer } from "@mega/memoize/utils/keyNormalizer";

Add Package

yarn dlx jsr add @mega/memoize

Import symbol

import { type KeyNormalizer } from "@mega/memoize/utils/keyNormalizer";

Add Package

pnpm dlx jsr add @mega/memoize

Import symbol

import { type KeyNormalizer } from "@mega/memoize/utils/keyNormalizer";

Add Package

bunx jsr add @mega/memoize

Import symbol

import { type KeyNormalizer } from "@mega/memoize/utils/keyNormalizer";