Last active
September 15, 2023 03:55
-
-
Save broven/33ab8c742f90ae4a4ea6fa0451dc8c2f to your computer and use it in GitHub Desktop.
nodejs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
for (let key in this.hooks) { | |
const hook = this.hooks[key as keyof typeof this.hooks]; | |
hook.intercept({ | |
call: (...args) => { | |
logger.debug(`Start call hook: ${key} ${util.inspect(args)}`) | |
}, | |
tap(tap: Tap) { | |
logger.debug(`[hook] executing >>${tap.name}<< hook`) | |
}, | |
register(tap) { | |
logger.debug(`[hook] register >>${tap.name}<< hook`) | |
return tap; | |
}, | |
}) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment