Sha256: 61305524bbc9e9bd8647db151bd82374a1354d21c3a0eafeb0b5fd93c137816b
Contents?: true
Size: 690 Bytes
Versions: 10
Compression:
Stored size: 690 Bytes
Contents
/*! (c) Andrea Giammarchi - ISC */ import {deserialize} from './deserialize.js'; import {serialize} from './serialize.js'; const {parse: $parse, stringify: $stringify} = JSON; const options = {json: true, lossy: true}; /** * Revive a previously stringified structured clone. * @param {string} str previously stringified data as string. * @returns {any} whatever was previously stringified as clone. */ export const parse = str => deserialize($parse(str)); /** * Represent a structured clone value as string. * @param {any} any some clone-able value to stringify. * @returns {string} the value stringified. */ export const stringify = any => $stringify(serialize(any, options));
Version data entries
10 entries across 10 versions & 1 rubygems