【文件属性】:
文件名称:typed-array-number-function:在广播数字参数时将函数应用于每个类型的数组元素
文件大小:26KB
文件格式:ZIP
更新时间:2021-05-15 15:03:43
JavaScript
类型数组编号函数
在广播数字参数时,对每个元素应用一个函数。
安装
$ npm install compute-typed-array-number-function
要在浏览器中使用,请使用 。
用法
var arrayfun = require ( 'compute-typed-array-number-function' ) ;
arrayfun(fcn,... value [,options])
在广播numeric参数时,对每个元素应用一个function 。 value参数可以是或number基元。
var arr = new Int8Array ( [ 1 , 2 , 3 , 4 , 5 ] ) ;
function add ( x , y ) {
return x + y ;
}
var out = arrayfun ( add , arr , 5 ) ;
/
【文件预览】:
typed-array-number-function-master
----.travis.yml(143B)
----.jshintignore(118B)
----package.json(2KB)
----test()
--------test.factory.js(7KB)
--------test.js(997B)
--------test.create.js(4KB)
--------test.apply.js(5KB)
--------test.validate.js(2KB)
--------test.apply.raw.js(2KB)
--------test.factory.raw.js(5KB)
--------fixtures()
----LICENSE(1KB)
----TODO.md(11B)
----.npmignore(498B)
----examples()
--------index.js(363B)
----.gitignore(1KB)
----lib()
--------index.js(283B)
--------factory.js(4KB)
--------apply.raw.js(2KB)
--------factory.raw.js(3KB)
--------apply.js(3KB)
--------create.js(3KB)
--------validate.js(1KB)
----Makefile(2KB)
----README.md(10KB)
----.jshintrc(1KB)
----.editorconfig(169B)
----.gitattributes(12B)