Socket
Book a DemoInstallSign in
Socket

clon

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

clon

Fast-clones an object using `JSON.parse(JSON.stringify(obj))`

latest
Source
npmnpm
Version
1.0.0
Version published
Weekly downloads
3
50%
Maintainers
1
Weekly downloads
 
Created
Source

clon

Build Status npm install js-standard-style

Fast-clones an object using JSON.parse(JSON.stringify(obj))

Note: This function will throw if your object is not JSON serializable.

Example

var clon = require('clon')

var dup = clon({a: 1, b: 2})

console.log(dup)  // {a: 1, b: 2}

License

MIT. See LICENSE for details.

Keywords

clone

FAQs

Package last updated on 26 Apr 2016

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