UNPKG

cryonic

Version:

Easily pickle/serialize/freeze/store and re-hydrate complex JavaScript objects (including Functions)

10 lines (6 loc) 293 B
var Cryo = require('../lib/cryo'); var number = Infinity; var withJSON = JSON.parse(JSON.stringify(number)); console.log(withJSON === Infinity); // false var withCryo = Cryo.parse(Cryo.stringify(number)); console.log(withCryo === Infinity); // true