aswi2020vldc-gitlab/templetes/node_modules/yargs/lib/middleware.js @ 9b6ff40e
1 |
module.exports = function (globalMiddleware, context) { |
---|---|
2 |
return function (callback) { |
3 |
if (Array.isArray(callback)) { |
4 |
Array.prototype.push.apply(globalMiddleware, callback) |
5 |
} else if (typeof callback === 'function') { |
6 |
globalMiddleware.push(callback) |
7 |
}
|
8 |
return context |
9 |
}
|
10 |
}
|