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)
interface ValueSerializer

Serializer/deserializer interface for memoization caches that need to serialize values.

Type Parameters

Properties

parse: (
this: void,
value: string,
) => T
stringify: (
this: void,
value: T,
) => string

Add Package

deno add jsr:@mega/memoize

Import symbol

import { type ValueSerializer } from "@mega/memoize/utils/valueSerializer";

---- OR ----

Import directly with a jsr specifier

import { type ValueSerializer } from "jsr:@mega/memoize/utils/valueSerializer";

Add Package

npx jsr add @mega/memoize

Import symbol

import { type ValueSerializer } from "@mega/memoize/utils/valueSerializer";

Add Package

yarn dlx jsr add @mega/memoize

Import symbol

import { type ValueSerializer } from "@mega/memoize/utils/valueSerializer";

Add Package

pnpm dlx jsr add @mega/memoize

Import symbol

import { type ValueSerializer } from "@mega/memoize/utils/valueSerializer";

Add Package

bunx jsr add @mega/memoize

Import symbol

import { type ValueSerializer } from "@mega/memoize/utils/valueSerializer";