Checks whether JS code string is valid code in the current context

validate(code_string)

Format

An object of class NULL of length 0.

Arguments

code_string

The JS code to check

Value

A boolean indicating whether code is valid

Examples

if (FALSE) { # \dontrun{
ctx <- JSContext$new()
ctx$validate("1 + 2")
} # }