add death (aka separate calls for each patch)

master
Drake 2 years ago
parent bf1d5f0932
commit a57413fd1e

@ -23,4 +23,21 @@ function monkeyPatch(name, parentObj, patches) {
};
return unpatch;
}
module.exports = monkeyPatch
function before(name, parentObj, func) {
return monkeyPatch(name, parentObj, {before: func})
}
function instead(name, parentObj, func) {
return monkeyPatch(name, parentObj, {instead: func})
}
function after(name, parentObj, func) {
return monkeyPatch(name, parentObj, {after: func})
}
module.exports = {
monkeyPatch,
before,
instead,
after
}

Loading…
Cancel
Save