@hankychung/deep-copy
v1.0.9
Published
a tool for copying object/array in a real deep way
Downloads
2
Maintainers
Readme
description
a tool for copying object/array in a real deep way
usage
npm i @hankychung/deep-copy -D
import deepCopy from '@hankychung/deep-copy'
let a = {
age: 1,
jobs: {
first: "Fir"
},
lang: [
{
name: 'usa'
},
{
name: 'cn'
}
],
arr: [
[
{
value: '1'
}
],
[
{
value: '2'
}
],
]
};
let dc = deepCopy(a)
params
example: deepCopy(input)
input
type: object
, array
desc: things you want to copy
return: things that have been copied and have no any relationship with the source