set-map:映射一组

时间:2021-05-12 09:39:51
【文件属性】:
文件名称:set-map:映射一组
文件大小:4KB
文件格式:ZIP
更新时间:2021-05-12 09:39:51
JavaScript 设置图 映射一 因为Set缺少Set#map方法。 安装 $ npm install set-map 用法 import setMap from 'set-map' ; const set = new Set ( [ 'foo' , 'bar' ] ) ; setMap ( set , value => `yo ${ value } ` ) . values ( ) ; //=> ['yofoo', 'yobar'] 原料药 setMap(输入,映射器) 输入 类型: Set Set为映射。 映射器(元素) 类型: function 调用每个元素,并应返回新元素。
【文件预览】:
set-map-main
----.gitattributes(19B)
----.github()
--------workflows()
----test.js(160B)
----license(1KB)
----.npmrc(19B)
----.editorconfig(175B)
----.gitignore(23B)
----index.js(103B)
----readme.md(551B)
----package.json(599B)

网友评论