Skip to content

Instantly share code, notes, and snippets.

@vdeturckheim
Last active February 23, 2017 15:38
Embed
What would you like to do?
function () {
runPreHooks(this, arguments);
let result;
try {
if (new.target) {
result = Reflect.construct(fn, arguments, new.target);
}
restult = fn.apply(this, arguments);
}
catch (err) {
runFaillingHooks(this, arguments, err);
throw err;
}
runPostHooks(this, arguments, result);
return result;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment