今天在公司利用空闲时间手写了一个深度拷贝对象或数组对象的方法,然后就发出来了, 使用方法是: 第一先从npm宕下来,npm install deeprep; 第二在项目中引入 import deeprep from deeprep; 之后可以就可以拷贝对象了,使用deeprep(obj) ---obj需要深度拷贝的对象; today write a function to deep cooy object in the free time,then how to use it? follow me the step; first:npm install deeprep; second: import deeprep from "deeprep"; finally: let copyObj = deeprep(obj) arg obj is copy object then this function will return new copy object;
deeprep
1.1.19 • Public • PublishedPackage Sidebar
Install
npm i deeprep
Weekly Downloads
3
Version
1.1.19
License
ISC
Unpacked Size
7.2 kB
Total Files
8