UNPKG

cryonic

Version:

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

12 lines (8 loc) 315 B
var Cryo = require('../lib/cryo'); var obj = { defaultValue: undefined }; var withJSON = JSON.parse(JSON.stringify(obj)); console.log(withJSON.hasOwnProperty('defaultValue')); // false var withCryo = Cryo.parse(Cryo.stringify(obj)); console.log(withCryo.hasOwnProperty('defaultValue')); // true