Friday, July 1, 2022

Preventing accidental alert and console.log on production

Use this regular expression to find stray console.log and alert:
^[^\/]\s+console\.log
^[^\/]\s+alert

No comments:

Post a Comment