Skip to main content
Home
This package has been archived, and as such it is read-only.
Works with
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 Score100%
Publisheda year ago (0.4.0)

Simple JS serialiser for MicroRender, supporting more types than JSON.

function deserialise
deserialise(
bytes: ArrayBuffer,
locals?: Map<string, Constructor> | object,
): unknown

Deserialise a JS object created by serialise().

The constructor of each object should either be in globalThis (and have a name property that matches the key) or be specified in locals. They should be accessible to both serialise() and deserialise().

Parameters

optional
locals: Map<string, Constructor> | object

an object with an entry for each object or a Map mapping the name to its constructor function. Note that this Map is the opposite to the one passed to serialise(). If an object is passed, it is immediately converted to a Map.

Return Type

unknown

the deserialised object or primitive.

Report package

Please provide a reason for reporting this package. We will review your report and take appropriate action.

Please review the JSR usage policy before submitting a report.

Add Package

deno add jsr:@microrender/serialiser

Import symbol

import { deserialise } from "@microrender/serialiser";
or

Import directly with a jsr specifier

import { deserialise } from "jsr:@microrender/serialiser";

Add Package

pnpm i jsr:@microrender/serialiser
or (using pnpm 10.8 or older)
pnpm dlx jsr add @microrender/serialiser

Import symbol

import { deserialise } from "@microrender/serialiser";

Add Package

yarn add jsr:@microrender/serialiser
or (using Yarn 4.8 or older)
yarn dlx jsr add @microrender/serialiser

Import symbol

import { deserialise } from "@microrender/serialiser";

Add Package

vlt install jsr:@microrender/serialiser

Import symbol

import { deserialise } from "@microrender/serialiser";

Add Package

npx jsr add @microrender/serialiser

Import symbol

import { deserialise } from "@microrender/serialiser";

Add Package

bunx jsr add @microrender/serialiser

Import symbol

import { deserialise } from "@microrender/serialiser";