Closed adietish closed 3 years ago
Current impl looks as follows:
function hasDebugFlag(args: string[]): boolean { if (args) { // See https://nodejs.org/en/docs/guides/debugging-getting-started/ return args.some(arg => /^--inspect/.test(arg) || /^--debug/.test(arg)); } return false; }
This could be simplified to the following (not tested):
function hasDebugFlag(args: string[]): boolean { return args && args.some(arg => /^--inspect/.test(arg) || /^--debug/.test(arg)); }
Current impl looks as follows:
This could be simplified to the following (not tested):