【文件属性】:
文件名称:shift-arguments:移动 javascript 函数参数以更好地与不同框架集成
文件大小:3KB
文件格式:ZIP
更新时间:2021-06-14 12:32:32
JavaScript
移位参数
移动 javascript 函数参数以更好地与不同框架集成
npm install shift-arguments
用法
删除参数
var shiftArguments = require('shift-arguments');
function testFunc (result) {
}
function doSthAsync (callback) {
callback('error', 'result');
}
doSthAsync(shiftArguments(testFunc, -1));
添加空参数
var shiftArguments = require('shift-arguments');
function testFunc (error, result) {
}
function doSthAsync (callback) {
callback(
【文件预览】:
shift-arguments-master
----.travis.yml(60B)
----test()
--------shift-arguments.spec.js(900B)
----README.md(1KB)
----.gitignore(20B)
----index.js(416B)
----package.json(752B)