/deep-copy

faster deep copy for json data

Primary LanguageJavaScriptMIT LicenseMIT

json-deep-copy

Build Status Coverage Status

Faster deep-copy for json style object.

Features

  • Simplified lodash.deepClone, maybe 15 times faster when copy many compilcated objects.
  • Only support plain objects with number, string, array, boolean

Use

npm i json-deep-copy
const deepCopy = require('json-deep-copy')
// or
import deepCopy from 'json-deep-copy'

let deepCopyedObj = deepCopy(someObj)

Dev || test || benchmark

git clone git@github.com:zxdong262/deep-copy.git
cd deep-copy
npm i

# test
npm run test

# benchmark
npm run benchmark

LICENSE

MIT