Open baristaGeek opened 9 months ago
In detectConsoleLogs.ts we have the consoleLogRegex variable. It's a RegEx literal that will keep growing.
detectConsoleLogs.ts
consoleLogRegex
We can do something like the following to keep this RegEx more legible:
const consoleLogsByLanguage = [ "(console\.log" "print" // Add the syntax of each language ]
And then concat this into the RegEx literal. This possibly looks similar to this:
const consoleLogRegex = consoleLogsByLanguage.map(element => element).join('');
In
detectConsoleLogs.ts
we have theconsoleLogRegex
variable. It's a RegEx literal that will keep growing.We can do something like the following to keep this RegEx more legible:
And then concat this into the RegEx literal. This possibly looks similar to this:
const consoleLogRegex = consoleLogsByLanguage.map(element => element).join('');