PARSEPREFIX: string = ""

The variable for adding custom functions to the Chalkboard parsers.

Example

// Doesn't work
const twentyfour = Chalkboard.real.parse("Math.factorial(4)");

// Does work
Chalkboard.PARSEPREFIX = "Math.factorial = function(num) { let n = 1; for (var i = 1; i <= num; i++) { n *= i; } i--; return n; };";
const twentyfour = Chalkboard.real.parse("Math.factorial(4)");

Generated using TypeDoc