4
0
Fork 0
mirror of https://github.com/actions/setup-node.git synced 2025-11-08 21:46:55 +00:00
setup-node/node_modules/yargs/lib/middleware.js
Danny McCormick c3f0a8be66 Use husky
2019-06-05 11:34:47 -04:00

10 lines
301 B
JavaScript

module.exports = function (globalMiddleware, context) {
return function (callback) {
if (Array.isArray(callback)) {
Array.prototype.push.apply(globalMiddleware, callback)
} else if (typeof callback === 'function') {
globalMiddleware.push(callback)
}
return context
}
}