ignore-argument:像 Function.prototype.bind 部分应用忽略参数

时间:2021-06-22 11:42:25
【文件属性】:
文件名称:ignore-argument:像 Function.prototype.bind 部分应用忽略参数
文件大小:20KB
文件格式:ZIP
更新时间:2021-06-22 11:42:25
JavaScript 忽略参数 像 Function.prototype.bind / 部分应用程序忽略参数。 在 NPM 和 bower 上可用,名称为ignore-argument 。 有时你需要创建临时函数只是为了忽略一些参数 function foo ( a , b ) { ... } function bar ( cb ) { // calls cb with 3 arguments! cb ( 'foo' , 'a' , 'b' ) ; } bar ( foo ) ; // does not work, throws an error bar ( function ( first , a , b ) { // first argument is ignored return foo ( a , b ) ; } ) ; ignore-argument允许按位置跳过(忽略
【文件预览】:
ignore-argument-master
----.jshintrc(2KB)
----bower.json(466B)
----Gruntfile.js(1KB)
----src()
--------ignore-argument.js(403B)
----.travis.yml(125B)
----test()
--------index.html(531B)
--------es5-shim.js(49KB)
--------spec.js(1KB)
----README.md(4KB)
----.gitignore(32B)
----index.js(958B)
----package.json(1KB)

网友评论