Socket
Book a DemoInstallSign in
Socket

cold-storage

Package Overview
Dependencies
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

cold-storage

Full serialization of JS objects

latest
Source
npmnpm
Version
3.0.0
Version published
Maintainers
1
Created
Source

cold-storage

NPM Version NPM Downloads Build Status Coverage Status Dependency Status

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

Keywords

stack

FAQs

Package last updated on 02 Dec 2017

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts