1.2.0 • Published 10 months ago
devalue-codec v1.2.0
devalue-codec
Uses devalue to serialize expressions while retaining the original object type.
Accepts the following types, including arrays and objects:
stringnumberbooleanDatebigintMapSetArrayBufferInt8ArrayInt16ArrayInt32ArrayUint8ArrayUint16ArrayUint32ArrayUint8ClampedArrayRegExpundefinednull
Installation
npm install devalue-codecUsage
import { stringify, parse } from "devalue-codec";
const encoded = stringify({
key: "value",
});
const decoded = parse(encoded);