【文件属性】:
文件名称:clean-set:对象扩展运算符和Object.assign的替代方案
文件大小:84KB
文件格式:ZIP
更新时间:2021-05-02 09:03:27
JavaScript
干净的
快速更新深层嵌套对象中的值,并克隆触摸的每个节点,以进行简单的更改跟踪=== 。
如果只想对深层嵌套的值进行就地突变,请查看 。
安装
npm我干净了
包括针对commonjs,umd和esm的构建,并且少于200b 182b gzip(感谢 )
用法
let current = {
a : { b : [ ] , c : true } ,
d : [ ] ,
e : {
f : { g : 'hello' } ,
h : { i : 0 } ,
} ,
} ;
let next = cleanSet ( current , 'e.h.i' , 1 ) ;
/**
* Alternatively you can provide a function for the final parameter to
* receive the curren
【文件预览】:
clean-set-master
----.travis.yml(109B)
----package.json(1KB)
----.prettierrc(52B)
----assets()
--------chrome_67.png(14KB)
----tests()
--------index.js(8KB)
----LICENSE(1KB)
----package-lock.json(302KB)
----dist()
--------clean-set.modern.js.map(1KB)
--------clean-set.min.js.map(1KB)
--------clean-set.min.js(444B)
--------clean-set.js.map(1KB)
--------clean-set.es.js.map(1KB)
--------clean-set.js(269B)
--------clean-set.es.js(271B)
--------clean-set.modern.js(276B)
----index.d.ts(617B)
----.gitignore(987B)
----lib()
--------index.js(504B)
----README.md(2KB)