Use the V8
JavaScript engine to validate a nomnoml
diagram.
Source: R/validate.R
nomnoml_validate.Rd
Although the nomnoml
widgets render very quickly in the IDE, it can take a
few seconds to grab a static screenshot and create a png
file. In these
situations it can be helpful to validate if the nomnoml
JS library can
parse a diagram.
This function returns TRUE
if a diagram can be parsed, and FALSE
otherwise. If FALSE
the function also throws a warning.
Examples
if (FALSE) {
if (requireNamespace("V8", quietly = TRUE)) nomnoml_validate("[hello] -> [world]")
}