Initial commit (from f5274cbdce4ae7c9e4b937dcdf95ac70ae436d5f)
This commit is contained in:
commit
28ccc3db2d
13974 changed files with 2618436 additions and 0 deletions
17
node_modules/before-after-hook/lib/remove.js
generated
vendored
Normal file
17
node_modules/before-after-hook/lib/remove.js
generated
vendored
Normal file
|
|
@ -0,0 +1,17 @@
|
|||
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)
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue