pub fn validate(javascript: &str) -> Result<bool, Error>
Expand description
Validates the syntax of some JS
javascript
- A snippet of JS code
A Result
containing a boolean determining the validity of the JS,
or an error if something went wrong.
assert!(rustyscript::validate("5 + 5").expect("Something went wrong!"));