Skip to content

Instantly share code, notes, and snippets.

@zwhitchcox
Created April 20, 2022 12:27
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save zwhitchcox/94805416aa765707b7ac3d353265d4de to your computer and use it in GitHub Desktop.
Save zwhitchcox/94805416aa765707b7ac3d353265d4de to your computer and use it in GitHub Desktop.
snippets
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