mirror of
https://git.meshkee.com/cssd/cssd-back.git
synced 2026-10-10 23:11:06 +03:30
11 lines
301 B
JavaScript
Vendored
11 lines
301 B
JavaScript
Vendored
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
|
|
}
|
|
}
|