https://github.com/zxdong262/deep-copy
faster deep copy for json data
https://github.com/zxdong262/deep-copy
deep-copy js json
Last synced: about 1 year ago
JSON representation
faster deep copy for json data
- Host: GitHub
- URL: https://github.com/zxdong262/deep-copy
- Owner: zxdong262
- License: mit
- Created: 2017-05-18T06:50:06.000Z (about 9 years ago)
- Default Branch: master
- Last Pushed: 2023-08-31T04:05:41.000Z (almost 3 years ago)
- Last Synced: 2025-04-18T19:39:00.164Z (about 1 year ago)
- Topics: deep-copy, js, json
- Language: TypeScript
- Size: 1.26 MB
- Stars: 5
- Watchers: 1
- Forks: 2
- Open Issues: 16
-
Metadata Files:
- Readme: README.MD
- License: LICENSE
Awesome Lists containing this project
README
# json-deep-copy
[](https://github.com/zxdong262/deep-copy/actions)
[](https://codecov.io/gh/zxdong262/deep-copy)
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
```bash
npm i json-deep-copy
```
```js
const deepCopy = require('json-deep-copy')
// or
import deepCopy from 'json-deep-copy'
let deepCopyedObj = deepCopy(someObj)
```
## Dev || test || benchmark
```bash
git clone git@github.com:zxdong262/deep-copy.git
cd deep-copy
npm i
# test
npm run test
# benchmark
npm run benchmark
```
## LICENSE
MIT