filter-obj:将对象键和值过滤到新对象中

时间:2021-05-01 10:51:38
【文件属性】:
文件名称:filter-obj:将对象键和值过滤到新对象中
文件大小:5KB
文件格式:ZIP
更新时间:2021-05-01 10:51:38
JavaScript filter-obj 将对象键和值过滤到新对象中 安装 $ npm install filter-obj 用法 const filterObject = require ( 'filter-obj' ) ; const object = { foo : true , bar : false } ; const newObject = filterObject ( object , ( key , value ) => value === true ) ; //=> {foo: true} const newObject2 = filterObject ( object , [ 'bar' ] ) ; //=> {bar: false} 原料药 filterObject(来源,过滤器) filterObject(来源,includeKeys) 来源 类型: object 要从中过滤属
【文件预览】:
filter-obj-main
----index.test-d.ts(538B)
----.gitattributes(19B)
----.github()
--------workflows()
----test.js(672B)
----license(1KB)
----index.d.ts(1015B)
----.npmrc(19B)
----.editorconfig(175B)
----.gitignore(23B)
----index.js(400B)
----readme.md(911B)
----package.json(603B)

网友评论