deep-filter-object:返回对象的深层副本,递归过滤以仅包含与给定 glob 模式匹配的键

时间:2021-06-30 00:01:37
【文件属性】:
文件名称:deep-filter-object:返回对象的深层副本,递归过滤以仅包含与给定 glob 模式匹配的键
文件大小:6KB
文件格式:ZIP
更新时间:2021-06-30 00:01:37
JavaScript 深层过滤对象 返回对象的深层副本,递归过滤以仅包含与给定 glob 模式匹配的键。 使用安装 npm i deep-filter-object --save 用法 var deepFilter = require ( 'deep-filter-object' ) ; deepFilter ( { a : 'a' , b : { a : 'a' , b : { a : 'a' , b : 'b' , c : 'c' } } } , 'b' ) ; //=> {b: {b: {b: 'b'}}} 否定模式: deepFilter ( { foo : 'a' , bar : { foo : 'a' , bar : { foo : 'a' , bar : 'b' , baz : 'c' } } } , [ '*' , '!foo' ] ) ; //=> {bar: {bar: {bar:
【文件预览】:
deep-filter-object-master
----.travis.yml(37B)
----index.js(653B)
----test.js(2KB)
----package.json(1KB)
----LICENSE(1KB)
----.npmignore(536B)
----.gitignore(507B)
----.verb.md(1KB)
----README.md(2KB)
----.jshintrc(379B)
----.gitattributes(237B)

网友评论