zod
Powered by node:v8 and zod (as a peer dependency, please install it if you use it), with this value manager it is possible to save any serializable object, as well as perform type checking at runtime
node:v8
import { CacheManagers } from "@mateus-pires/file-cache";import z from "zod";const ZodManager = CacheManagers.Zod( z.object({ a: z.string().optional(), b: z.number() }));// cache: Cache<{ a?: string; b: number }>const cache = new Cache({ value_manager: ZodManager }); Copy
import { CacheManagers } from "@mateus-pires/file-cache";import z from "zod";const ZodManager = CacheManagers.Zod( z.object({ a: z.string().optional(), b: z.number() }));// cache: Cache<{ a?: string; b: number }>const cache = new Cache({ value_manager: ZodManager });
Generated using TypeDoc
Requires
zod
Powered by
node:v8
andzod
(as a peer dependency, please install it if you use it), with this value manager it is possible to save any serializable object, as well as perform type checking at runtimeExample