-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmod.ts
38 lines (37 loc) · 1.11 KB
/
mod.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
/**
* ## 🦕 serialize
*
* Serializes JavaScript / TypeScript to a _superset_ of JSON, supporting
* builtin featurs including RegExp, Date, BigInt, Map, Set, and more.
*
* ### Usage
*
* @example
* ```ts
* import { serialize } from "https://deno.land/x/serialize/mod.ts";
*
* serialize({
* bigints: 10n,
* regexps: /([^\s]+)/g,
* infinite: Number.POSITIVE_INFINITY,
* date: new Date(),
* maps: new Map([["hello", "world"]]),
* sets: new Set([123, 456]),
* funky: (arg) => `"${arg}"`,
* symbols: Symbol.for("Deno.customInspect"),
* });
* ```
* ---
* @author Nicholas Berlette <https://github.com/nberlette>
* @license MIT
* @see https://github.com/deno911/serialize/#readme
* @see https://doc.deno.land/https://deno.land/x/serialize/mod.ts
* ---
* Based heavily on the `serialize-javascript` project by Yahoo!, this was
* ported to TypeScript for Deno, and extended with a few extra features.
* @see https://github.com/yahoo/serialize-javascript
* ---
* @module
*/
export { default, serialize, type SerializeOptions } from "./serialize.ts";
export { deserialize } from "./deserialize.ts";