CMake options

OptionModule
BUILD_CONSOLEconsole.*
BUILD_GLOBALglobal.* (parseInt, parseFloat)
BUILD_STRINGstring.* (String.fromCharCode)
BUILD_DATEdate.*
BUILD_JSONjson.*
BUILD_MATHmath.*

Runtime binding

#include "extension/console.h"
#include "extension/global.h"
#include "extension/string.h"
#include "extension/date.h"
#include "extension/math.h"
#include "extension/json.h"

EConsole::bind(js);
EGlobal::bind(js);
EString::bind(js);
EDate::bind(js);
EMath::bind(js);
EJson::bind(js);

console

global

String (global object)

Date

Default format: %Y-%m-%d %H:%i:%s

Math

Constants: E, LN10, LN2, LOG10E, LOG2E, PI, SQRT1_2, SQRT2

Functions: abs acos acosh asin asinh atan atan2 atanh cbrt ceil clz32 cos cosh exp expm1 f16round floor fround hypot imul log log10 log1p log2 max min pow random round sign sin sinh sqrt sumPrecise tan tanh trunc

JSON

let o = JSON.parse('{"a":1,"b":[2,3]}');
JSON.stringify(o); // {"a":1,"b":[2,3]}
Core array/string methods work without extensions — see JavaScript Features.