1.2.0 • Published 10 months ago

devalue-codec v1.2.0

Weekly downloads
-
License
MIT
Repository
-
Last release
10 months ago

devalue-codec

Uses devalue to serialize expressions while retaining the original object type.

Accepts the following types, including arrays and objects:

  • string
  • number
  • boolean
  • Date
  • bigint
  • Map
  • Set
  • ArrayBuffer
  • Int8Array
  • Int16Array
  • Int32Array
  • Uint8Array
  • Uint16Array
  • Uint32Array
  • Uint8ClampedArray
  • RegExp
  • undefined
  • null

Installation

npm install devalue-codec

Usage

import { stringify, parse } from "devalue-codec";

const encoded = stringify({
	key: "value",
});

const decoded = parse(encoded);

Other codecs

1.2.0

10 months ago

1.1.0

10 months ago

1.0.5

10 months ago

1.0.4

10 months ago

1.0.3

10 months ago

1.0.2

10 months ago

1.0.1

10 months ago

1.0.0

10 months ago