Files
release-action/node_modules/before-after-hook/lib/remove.js
Nick Cipollo 6c34249ffc
Some checks failed
PR Checks / check_pr (push) Has been cancelled
Prepare 1.6.1 release
2020-03-05 13:25:53 -05:00

18 lines
316 B
JavaScript

module.exports = removeHook
function removeHook (state, name, method) {
if (!state.registry[name]) {
return
}
var index = state.registry[name]
.map(function (registered) { return registered.orig })
.indexOf(method)
if (index === -1) {
return
}
state.registry[name].splice(index, 1)
}