Prepare 1.8.6 release
Some checks failed
Test / check_pr (push) Has been cancelled

This commit is contained in:
Nick Cipollo
2021-05-24 11:25:03 -04:00
parent d1125b4510
commit 880be3d0a7
442 changed files with 156407 additions and 1 deletions

27
node_modules/before-after-hook/lib/register.js generated vendored Normal file
View File

@@ -0,0 +1,27 @@
module.exports = register;
function register(state, name, method, options) {
if (typeof method !== "function") {
throw new Error("method for before hook must be a function");
}
if (!options) {
options = {};
}
if (Array.isArray(name)) {
return name.reverse().reduce(function (callback, name) {
return register.bind(null, state, name, callback, options);
}, method)();
}
return Promise.resolve().then(function () {
if (!state.registry[name]) {
return method(options);
}
return state.registry[name].reduce(function (method, registered) {
return registered.hook.bind(null, method, options);
}, method)();
});
}