Dangers and Alternatives of
Dangers of Regular Expressions
Static Code Analysis
// This user input causes an infinite loop to run const user_input = "while(true) ;"; eval(user_input); // This user input closes the application const user_input = "process.exit(0)"; eval(user_input);
new Function() use
eval() in their implementations, and should be used with the same caution.