Skip to content Skip to sidebar Skip to footer

Determine Whether A String Contains Valid Javascript Code

I'm looking for a C# function which returns true if a string contains valid javascript syntax. For instance: IsValidJavascript('alert('hello');'); would return true, but IsValidJa

Solution 1:

You'll need to use an interpreter.
You can try Jint which is a Javascript interpreter for .NET.


Post a Comment for "Determine Whether A String Contains Valid Javascript Code"