cold-storage
v3.0.0
Published
Full serialization of JS objects
Downloads
8
Maintainers
Readme
cold-storage
Full serialization/deserialization for JS objects.
Install:
npm install cold-storage
// serialize returns a Buffer
// deserialize reads a Buffer
// clone is chaining the two
const { serialize, deserialize, clone } = require('cold-storage');
clone({ a: 1, b: 2 }) // => { a: 1, b: 2 }
clone({ deep: { value: null } }) // works with deep objects
clone({}) instanceof Object // false, even the prototypes are cloned
Breaking deserialization of existing serialized data is considered semver-major.
License
MIT