Created
April 20, 2022 12:27
-
-
Save zwhitchcox/94805416aa765707b7ac3d353265d4de to your computer and use it in GitHub Desktop.
snippets
This file contains hidden or 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
const zbug = (...args: any[]) => { | |
const stack = ((new Error).stack?.split('\n') as any[]) | |
.map((line: string) => line.substring(line.lastIndexOf('/') + 1)); | |
const _args: any[] = [...stack?.slice(2,3), ...args]; | |
// @ts-ignore | |
return _debug('node-raspberrypi-usbboot')(..._args); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment