This is the checkable support matrix for CodeMode's confined JavaScript interpreter. It tracks the language and standard-library surface that programs can use today, plus concrete gaps that may be implemented later.
[x] means the feature is implemented at the scope described here.[ ] means the feature is unavailable, incomplete, or intentionally divergent as described.When behavior changes, update this file and the tests in the same change. The implementation and tests remain the ultimate source of truth.
await and return through the program's implicit async-function scope.return, final top-level expression as a REPL-style result, and null when no value is produced.undefined and non-finite numbers normalized to null.tools tree only.null, undefined, booleans, finite and non-finite numbers, and strings.NaN and Infinity globals.const, let, and accepted var declarations.for...of bindings.var function scope, hoisting, and redeclaration. Accepted var currently behaves like a
lexical declaration; prefer let or const.let/const temporal-dead-zone and declaration-hoisting semantics.const { [field]: value } = record.const { length } = values.delete object[key].if/else and conditional expressions.switch, including default clauses and fallthrough.for, while, and do...while.for...of over arrays, strings, Maps, Sets, and URLSearchParams.for...in over own keys of plain objects, arrays, and tool references.break and continue.try, catch, optional catch bindings, and finally.throw with arbitrary values.break, and labeled continue.for await...of and async iteration.with and debugger statements.async functions.Boolean, Number, String, parseInt, parseFloat, and URI helpers as callbacks where applicable.this, super, constructor functions, or function prototype methods such as call, apply, and bind.yield.Promise.all, but a promise is not a meaningful predicate or sort result.values.map(Math.abs) or
records.map(JSON.stringify).await for sandbox promises; awaiting a plain value is a no-op.new for Error types, Date, RegExp, Map, Set, URL, and URLSearchParams.+, -, *, /, %, and **.==, !=, ===, !==, <, <=, >, and >=.&, |, ^, ~, <<, >>, and >>>.&&, ||, ??, and !, with short-circuiting.+, unary -, typeof, instanceof, and own-property-only in.++ and --.void and delete.new Promise(...).await, repeated awaits, and implicit resolution when a promise is returned from a function/program.Promise.resolve and Promise.reject.Promise.all, Promise.allSettled, and Promise.race over supported collections containing promises and plain
values.Promise.all preserves result order and rejects on the first observed failure.Promise.allSettled returns plain fulfilled/rejected outcome records.Promise.race interrupts losing in-flight tool calls.try/catch can handle awaited tool and promise failures.Promise.all, Promise.allSettled, and Promise.race. These calls currently settle
before returning, so separately constructed combinator batches do not overlap as normal JavaScript promises do.Promise.any..then, .catch, and .finally.new Promise(...).Object.keys, Object.values, Object.entries, Object.hasOwn, Object.assign, and Object.fromEntries.Object.keys over arrays and tool references.__proto__, constructor, and prototype.Object.is; runtime and tool-reference identity semantics need to be defined first.Object.groupBy.__proto__, constructor, or prototype.Array.isArray, Array.of, and Array.from.map, filter, flatMap, and forEach.find, findIndex, findLast, findLastIndex, some, every, includes, indexOf, and
lastIndexOf.reduce and reduceRight.sort, toSorted, reverse, and toReversed.at, slice, concat, flat, with, and join.push, pop, shift, unshift, splice, fill, and copyWithin.keys, values, and entries return arrays rather than iterators.length, numeric indexing, index assignment, spread, and for...of.thisArg forms of Array.from.Array.prototype.toSpliced."01" must not alias index 1.findLast return behavior when its predicate mutates the examined element.toLowerCase, toUpperCase, normalize.trim, trimStart, trimEnd, trimLeft, and trimRight.includes, startsWith, endsWith, indexOf, lastIndexOf, and search.slice, substring, substr, at, charAt, charCodeAt, and codePointAt.split, concat, repeat, padStart, padEnd, replace, and replaceAll.match, materialized matchAll, replace, replaceAll, split, and search.localeCompare; locale and options arguments are currently ignored.toString, length, numeric indexing, spread, and for...of by Unicode code point.String.fromCharCode and String.fromCodePoint.localeCompare and locale formatting APIs.match() and search().Number, parseInt, and parseFloat.Number.isInteger, Number.isFinite, Number.isNaN, Number.isSafeInteger,
Number.parseInt, and Number.parseFloat.toFixed, toPrecision, toExponential, toString, and valueOf.MAX_SAFE_INTEGER, MIN_SAFE_INTEGER, MAX_VALUE, MIN_VALUE, EPSILON, NaN,
POSITIVE_INFINITY, and NEGATIVE_INFINITY.PI, E, LN2, LN10, LOG2E, LOG10E, SQRT2, and SQRT1_2.random, max, min, abs, acos, acosh, asin, asinh, atan, atan2, atanh,
floor, ceil, round, trunc, sign, sqrt, cbrt, pow, hypot, cos, cosh, sin, sinh,
tan, tanh, log, log2, log10, log1p, exp, expm1, f16round, fround, clz32, and imul.Number() and String(); they currently do not produce 0 and "".++ and -- rather than host Number(...) coercion.Math.sumPrecise.isFinite and isNaN.JSON.parse and JSON.stringify.JSON.stringify.console.log, console.info, console.debug, console.warn, and console.error.console.dir and console.table.JSON.parse reviver callbacks.JSON.stringify function/array replacers.Date.now, Date.parse, and Date.UTC.new Date() from the current time, epoch milliseconds, a date string, another Date, or local components.getTime, valueOf, toISOString, toJSON, and deterministic ISO toString.getFullYear, getMonth, getDate, getDay, getHours, getMinutes, getSeconds, and
getMilliseconds.getUTCFullYear, getUTCMonth, getUTCDate, getUTCDay, getUTCHours, getUTCMinutes,
getUTCSeconds, and getUTCMilliseconds.getTimezoneOffset, arithmetic, relational comparison, and instanceof Date.null.toUTCString, locale methods, and other Date formatting methods.RangeError branding for invalid toISOString() calls.new RegExp(pattern, flags) construction.test, exec, and toString.source, flags, lastIndex, global, ignoreCase, multiline, sticky, unicode, and dotAll.lastIndex.d and v flags.RegExp.escape.new Map() from entry arrays or another Map.get, set, has, delete, clear, size, and forEach.new Set() from arrays, strings, or another Set.add, has, delete, clear, size, and forEach.keys, values, and entries arrays for Map and Set.for...of, Array.from, and Object.fromEntries integration.{} at host/JSON boundaries.union, intersection, difference, and relation predicates.encodeURI, encodeURIComponent, decodeURI, and decodeURIComponent.new URL(input, base), URL.canParse, and URL.parse.toString, toJSON, and linked searchParams.href, origin, protocol, username, password, host, hostname, port,
pathname, search, and hash.origin.new URLSearchParams() from query strings, data objects, pairs, Maps, and URLSearchParams.append, delete, get, getAll, has, set, sort, forEach, keys, values,
entries, toString, and size.{}.Error, TypeError, RangeError, SyntaxError, ReferenceError, EvalError, and URIError, callable with
or without new.name/message, error inheritance through instanceof, and plain-data serialization.instanceof for Date, RegExp, Map, Set, URL, URLSearchParams, Array, Object, Promise, and Error types.ToolError messages.catch and Promise.allSettled.These are actionable implementation items. Check them off only when behavior and direct tests land.
Promise.all, Promise.allSettled, and Promise.race.undefined so invalid values cannot silently become
null in render-only or OpenAPI tool calls.These constraints preserve CodeMode's confinement and host-neutral scope. They are not TODO items.
fetch, timers, crypto, or other host globals unless a future host explicitly supplies a bounded capability.eval, Function(...), arbitrary host execution, and prototype mutation.