1.0.2 • Published 6 years ago
ctrlcv v1.0.2
CTRLCV
Copies a simple JS object using
JSON.stringifyandJSON.parse.
Install
npm i -S ctrlcv or yarn add ctrlcv
Usage
import copy from "ctrlcv"
const a = { prop1: "wibble", prop2: "wobble" }
const b = copy(a)
b.prop1 = "wubble"
alert(a.prop1 !== v.prop1) //true