API Reference¶
Every symbol defined in this repository and exported from the cl-cc/javascript
package, in the order and under the groupings src/package.lisp itself uses for its
:export list. Lambda lists are reproduced from the definitions in src/. A further
~70 exports are symbols re-exported from sibling nerima-lisp packages rather than
defined here — see Re-exported symbols at the end of this page
for why they're exported at all and where their own documentation lives.
Reading this page¶
Symbols prefixed with %js- are runtime bridge helpers. They are not an API to
call by hand: the parser emits calls to them, and cl-cc's backend resolves them
through the bridge provider registered in src/runtime-bridge-provider.lisp. They are
exported because generated code has to name them. The handful of symbols without the
prefix — tokenize-js-source, parse-js-source, parse-js-module, js-program-forms
and the js-exception condition — are the surface most callers want; see
Quick Start.
Two conventions hold across the whole page, so they are not repeated per entry.
Signals. A runtime helper signals js-exception wherever the ECMAScript
specification defines a thrown error, and otherwise propagates standard Common Lisp
conditions (type-error, division-by-zero) for inputs the code generator does not
produce. Entries that deviate say so. See Conditions.
Undefined. +js-undefined+ (the keyword :js-undefined) is the sentinel for
JavaScript undefined, and +js-null+ (:js-null) is null. Neither is nil: nil
and t are JavaScript false and true. See
Core Concepts.
Entry points¶
tokenize-js-source¶
Tokenize JavaScript SOURCE string into a list of token plists.
Defined in src/lexer-operator.lisp.
parse-js-source¶
Parse a JavaScript SOURCE string and return a list of top-level AST nodes.
Defined in src/parser.lisp.
parse-js-module¶
Parse a JavaScript ES module SOURCE string. Identical to parse-js-source today
(import/export syntax already parses unconditionally); kept as its own named entry
point for callers who mean "this is a module", ahead of any future module-only
validation.
Defined in src/parser.lisp.
js-program-forms¶
Parse JS SOURCE prepending the standard-globals prelude.
Defined in src/runtime-builtins-prelude.lisp.
%js-make-console¶
Construct the JS `console' global object from %js-console-method-specs.
Defined in src/runtime-console.lisp.
JS-specific unary / binary operators¶
%js-typeof¶
Return JS typeof string for X.
Defined in src/runtime.lisp.
%js-instanceof¶
JS instanceof.
Defined in src/runtime.lisp.
%js-delete¶
JS delete operator.
Defined in src/runtime-property.lisp.
%js-in¶
JS 'key in obj'.
Defined in src/runtime-property.lisp.
%js-loose-eq¶
JS == with type coercion.
Defined in src/runtime.lisp.
%js-strict-eq¶
JS === strict equality, no coercion.
Defined in src/runtime.lisp.
%js-optional-chain¶
Return nil if OBJ is null/undefined, else %js-get-prop.
Defined in src/runtime-property.lisp.
%js-optional-call¶
Call FUNC with ARGS unless FUNC is null/undefined.
Defined in src/runtime-property.lisp.
%js-optional-method-call¶
obj?.method(args) — short-circuit to undefined when OBJ is null/undefined.
Defined in src/runtime-property.lisp.
%js-spread¶
Expand iterable into a CL list (for use with apply).
Defined in src/runtime-class.lisp.
Destructuring¶
%js-destructure-array¶
Array-destructuring rest helper.
Defined in src/runtime-object-ops.lisp.
%js-destructure-object¶
Object-destructuring rest helper.
Defined in src/runtime-object-ops.lisp.
String / template helpers¶
%js-template-string¶
Concatenate template literal parts (already evaluated).
Defined in src/runtime-property.lisp.
%js-to-string¶
JS ToString coercion.
Defined in src/runtime-property.lisp.
Property access / object construction¶
%js-get-prop¶
Get property KEY from JS object/array/string.
Defined in src/runtime-property.lisp.
%js-set-prop¶
Set property KEY on JS object/array.
Defined in src/runtime-property.lisp.
%js-make-object¶
Create a JS object from alternating key/value args.
Defined in src/runtime-object.lisp.
%js-make-array¶
Create a JS array from ELEMENTS.
Defined in src/runtime-array-core.lisp.
Private class fields¶
%js-class-private-field-get¶
Read a private field from OBJ.
Defined in src/runtime-class.lisp.
%js-class-private-field-set¶
Write a private field on OBJ.
Defined in src/runtime-class.lisp.
%js-has-private-field¶
True if OBJ has the named private field.
Defined in src/runtime-class.lisp.
Promise type¶
js-promise-p¶
True when OBJECT is a js-promise structure.
Defined in src/runtime-promise.lisp.
js-promise-value¶
Settled value of PROMISE.
Defined in src/runtime-promise.lisp.
js-promise-rejected-p¶
True when PROMISE settled as rejected.
Defined in src/runtime-promise.lisp.
Async / generator¶
%js-yield¶
Suspend the active generator body, handing VALUE to its consumer, and resume with whatever the next .next(v)/.throw(e)/.return(v) call sends — returning V, raising E at this point, or unwinding out to end the body.
Defined in src/runtime-generator.lisp.
%js-yield-from¶
yield* — drain ITERABLE into the active generator by reusing %js-for-of, so each drained element suspends/resumes exactly like a direct yield.
Defined in src/runtime-generator.lisp.
%js-await¶
Synchronously unwrap a promise (for simplified async model).
Defined in src/runtime-promise.lisp.
%js-async¶
Execute THUNK, wrapping result/exception in a promise.
Defined in src/runtime-promise.lisp.
%js-make-async¶
Wrap FN as an async function: invoking it returns a resolved/rejected promise.
Defined in src/runtime-generator.lisp.
%js-make-async-generator¶
Simplified async generator: delegates to %js-make-async.
Defined in src/runtime-generator.lisp.
%js-make-generator¶
Return a JS iterator object that runs BODY-FN as a suspend/resume coroutine: each .next()/.throw()/.return() call resumes it for exactly one step and blocks until it yields, returns, or throws.
Defined in src/runtime-generator.lisp.
%js-generator-next¶
Advance GEN by one step (delegates to its 'next' method).
Defined in src/runtime-generator.lisp.
%js-wrap-generator-body¶
Return a function that, when called, produces a fresh generator from BODY-FN.
Defined in src/runtime-generator.lisp.
Temporal API (ES2026)¶
*js-temporal-global*¶
The Temporal global namespace (immutable datetime API, ES2026).
Defined in src/runtime-temporal-global.lisp.
%js-temporal-instant¶
epochMilliseconds.
Defined in src/runtime-temporal.lisp.
%js-temporal-plain-date¶
month.
Defined in src/runtime-temporal.lisp.
%js-temporal-plain-time¶
minute.
Defined in src/runtime-temporal-datetime.lisp.
%js-temporal-plain-datetime¶
month.
Defined in src/runtime-temporal-datetime.lisp.
%js-temporal-zoned-datetime¶
month.
Defined in src/runtime-temporal-datetime.lisp.
%js-temporal-duration¶
(cl-cc/javascript:%js-temporal-duration &key (years 0) (months 0) (weeks 0) (days 0) (hours 0) (minutes 0) (seconds 0) (milliseconds 0) (microseconds 0) (nanoseconds 0))
months.
Defined in src/runtime-temporal-duration.lisp.
%js-temporal-plain-year-month¶
month.
Defined in src/runtime-temporal.lisp.
%js-temporal-plain-month-day¶
day.
Defined in src/runtime-temporal.lisp.
ES2025 TypedArray¶
%js-uint8-from-hex¶
Uint8Array.fromHex(string) — ES2025.
Defined in src/runtime-typed-arrays-encoding.lisp.
%js-uint8-from-base64¶
Uint8Array.fromBase64(string) — ES2025.
Defined in src/runtime-typed-arrays-encoding.lisp.
%js-uint8-to-hex¶
Uint8Array.prototype.toHex() — ES2025.
Defined in src/runtime-typed-arrays-encoding.lisp.
%js-uint8-to-base64¶
Uint8Array.prototype.toBase64() — ES2025.
Defined in src/runtime-typed-arrays-encoding.lisp.
Exception handling¶
js-exception¶
Condition signalled by %js-throw for a JavaScript throw. The thrown JS value is read back with js-exception-value.
Defined in src/runtime-control.lisp.
js-exception-value¶
The JS value carried by a JS-EXCEPTION.
Defined in src/runtime-control.lisp.
%js-throw¶
Signal js-exception carrying VALUE. This is the JavaScript throw statement.
Defined in src/runtime-control.lisp.
%js-try-catch-finally¶
Execute TRY-THUNK; on JS exception call CATCH-THUNK with the value.
Defined in src/runtime-control.lisp.
Iteration protocols¶
%js-for-in¶
Execute BODY-FN for each enumerable string key in OBJ.
Defined in src/runtime-control.lisp.
%js-for-of¶
Execute BODY-FN for each element of ITERABLE.
Defined in src/runtime-control.lisp.
Module system¶
%js-new¶
Instantiate a JS class.
Defined in src/runtime-class.lisp.
%js-import¶
Dynamic import host hook returning a resolved module namespace promise.
Defined in src/runtime-module.lisp.
%js-import-meta¶
Return host metadata for import.meta.
Defined in src/runtime-module.lisp.
%js-export¶
Record a module export and return VALUE.
Defined in src/runtime-module.lisp.
%js-debugger¶
JS debugger statement — no-op.
Defined in src/runtime-class.lisp.
%js-new-target¶
Return new.target — undefined outside a constructor.
Defined in src/runtime-ops.lisp.
Operator helpers (bitwise, shift, unary, increment)¶
%js-bitwise-not¶
JS ~x: flip all 32 bits then sign-extend.
Defined in src/runtime-ops.lisp.
%js-bitwise-or¶
JS a | b. Both operands are coerced to 32-bit integers and the result is sign-extended.
Defined in src/runtime-ops.lisp.
%js-bitwise-and¶
JS a & b. Both operands are coerced to 32-bit integers and the result is sign-extended.
Defined in src/runtime-ops.lisp.
%js-bitwise-xor¶
JS a ^ b. Both operands are coerced to 32-bit integers and the result is sign-extended.
Defined in src/runtime-ops.lisp.
%js-shift-left¶
JS a << b (b taken mod 32).
Defined in src/runtime-ops.lisp.
%js-shift-right¶
JS a >> b, arithmetic (signed).
Defined in src/runtime-ops.lisp.
%js-unsigned-shift-right¶
JS a >>> b, logical (unsigned, always non-negative).
Defined in src/runtime-ops.lisp.
%js-unary-plus¶
JS unary +: numeric coercion.
Defined in src/runtime-ops.lisp.
%js-postfix-inc¶
Value of the postfix x++ expression, which is the operand before incrementing. The store itself is emitted separately by the parser.
Defined in src/runtime-ops.lisp.
%js-postfix-dec¶
Value of the postfix x-- expression, which is the operand before decrementing. The store itself is emitted separately by the parser.
Defined in src/runtime-ops.lisp.
%js-prefix-inc¶
JS ++x: coerce VAL to a number and add one.
Defined in src/runtime-ops.lisp.
%js-prefix-dec¶
JS --x: coerce VAL to a number and subtract one.
Defined in src/runtime-ops.lisp.
Class / accessor helpers¶
%js-accessor¶
Tag FN as a get/set accessor descriptor.
Defined in src/runtime-ops.lisp.
%js-make-regex¶
Create a JS RegExp from PATTERN and FLAGS strings.
Defined in src/runtime-regex-api.lisp.
%js-assign-pattern¶
Fallback for destructuring assignment to a non-simple LHS: returns RHS.
Defined in src/runtime-ops.lisp.
Resource management¶
%js-using-register¶
Register RESOURCE for disposal at scope exit (simplified: identity).
Defined in src/runtime-ops.lisp.
Console helpers¶
%js-console-log¶
JS console.log. Writes each argument to standard output as a JS string, space separated, and returns +js-undefined+.
Defined in src/runtime-console.lisp.
%js-console-error¶
JS console.error. As %js-console-log, but writes to *error-output*.
Defined in src/runtime-console.lisp.
%js-console-warn¶
JS console.warn. As %js-console-log, but writes to *error-output* behind a Warning: prefix.
Defined in src/runtime-console.lisp.
Truthiness / nullish helpers¶
%js-truthy¶
JS truthiness: false, 0, NaN, "", null, undefined are falsy.
Defined in src/runtime.lisp.
%js-not-nullish¶
True if X is not null or undefined.
Defined in src/runtime.lisp.
Global number-parsing helpers (referenced in js-program-forms)¶
%js-parse-int¶
Parse integer from string S in the given RADIX (default 10).
Defined in src/runtime-builtins-globals.lisp.
%js-parse-float¶
JS parseFloat: parse the LONGEST leading numeric prefix of S (so "3.14abc" -> 3.14), or NaN when there is no leading number.
Defined in src/runtime-builtins-globals.lisp.
%js-is-nan¶
Return true if X converts to NaN.
Defined in src/runtime-builtins-globals.lisp.
%js-is-finite¶
Return true if X is finite (not NaN, not Infinity).
Defined in src/runtime-builtins-globals.lisp.
Built-in dispatch table¶
*js-builtin-map*¶
Dispatch table from JS built-in name to CL function.
Defined in src/runtime-builtins-table.lisp.
Math built-ins¶
%js-math-abs¶
Bridge for Math.abs.
Defined in src/runtime-math.lisp.
%js-math-ceil¶
Bridge for Math.ceil.
Defined in src/runtime-math.lisp.
%js-math-floor¶
Bridge for Math.floor.
Defined in src/runtime-math.lisp.
%js-math-round¶
Bridge for Math.round.
Defined in src/runtime-math.lisp.
%js-math-max¶
Bridge for Math.max.
Defined in src/runtime-math.lisp.
%js-math-min¶
Bridge for Math.min.
Defined in src/runtime-math.lisp.
%js-math-pow¶
Bridge for Math.pow.
Defined in src/runtime-math.lisp.
%js-math-sqrt¶
Bridge for Math.sqrt.
Defined in src/runtime-math.lisp.
%js-math-log¶
Bridge for Math.log.
Defined in src/runtime-math.lisp.
%js-math-log2¶
Bridge for Math.log2.
Defined in src/runtime-math.lisp.
%js-math-log10¶
Bridge for Math.log10.
Defined in src/runtime-math.lisp.
%js-math-exp¶
Bridge for Math.exp.
Defined in src/runtime-math.lisp.
%js-math-sin¶
Bridge for Math.sin.
Defined in src/runtime-math.lisp.
%js-math-cos¶
Bridge for Math.cos.
Defined in src/runtime-math.lisp.
%js-math-tan¶
Bridge for Math.tan.
Defined in src/runtime-math.lisp.
%js-math-asin¶
Bridge for Math.asin.
Defined in src/runtime-math.lisp.
%js-math-acos¶
Bridge for Math.acos.
Defined in src/runtime-math.lisp.
%js-math-atan¶
Bridge for Math.atan.
Defined in src/runtime-math.lisp.
%js-math-atan2¶
Bridge for Math.atan2.
Defined in src/runtime-math.lisp.
%js-math-hypot¶
Bridge for Math.hypot.
Defined in src/runtime-math.lisp.
%js-math-trunc¶
Bridge for Math.trunc.
Defined in src/runtime-math.lisp.
%js-math-sign¶
Bridge for Math.sign.
Defined in src/runtime-math.lisp.
%js-math-clz32¶
Count leading zeros in the 32-bit representation.
Defined in src/runtime-math.lisp.
%js-math-fround¶
Bridge for Math.fround.
Defined in src/runtime-math.lisp.
%js-math-f16round¶
Bridge for Math.f16round.
Defined in src/runtime-math.lisp.
%js-math-imul¶
32-bit integer multiply, sign-extended.
Defined in src/runtime-math.lisp.
%js-math-random¶
Bridge for Math.random.
Defined in src/runtime-math.lisp.
Array built-ins¶
%js-array-for-each¶
Call FN(element, index, arr) for each element of ARR; returns undefined (JS Array.prototype.forEach).
Defined in src/runtime-array-core.lisp.
%js-array-push¶
Append VAL to ARR; return new length.
Defined in src/runtime-array-core.lisp.
%js-array-pop¶
Remove and return last element, or undefined.
Defined in src/runtime-array-core.lisp.
%js-array-shift¶
Remove and return first element.
Defined in src/runtime-array-core.lisp.
%js-array-unshift¶
Prepend ITEMS to ARR; return new length.
Defined in src/runtime-array-core.lisp.
%js-array-splice¶
(cl-cc/javascript:%js-array-splice arr start &optional (delete-count nil delete-count-supplied-p) &rest items)
Splice: remove DELETE-COUNT elements at START, insert ITEMS.
Defined in src/runtime-array-transforms.lisp.
%js-array-slice¶
Return a new array slice.
Defined in src/runtime-array-core.lisp.
%js-array-concat¶
Concatenate ARR with OTHERS.
Defined in src/runtime-array-transforms.lisp.
%js-array-join¶
Join array elements with separator.
Defined in src/runtime-array-core.lisp.
%js-array-reverse¶
Reverse ARR in place; return ARR.
Defined in src/runtime-array-transforms.lisp.
%js-array-sort¶
Sort ARR in place; return ARR.
Defined in src/runtime-array-transforms.lisp.
%js-array-flat¶
Flatten ARR up to DEPTH levels.
Defined in src/runtime-array-transforms.lisp.
%js-array-flat-map¶
Map FN then flatten one level.
Defined in src/runtime-array-transforms.lisp.
%js-array-map¶
Map FN over ARR, returning new array.
Defined in src/runtime-array-core.lisp.
%js-array-filter¶
Filter ARR by predicate FN.
Defined in src/runtime-array-core.lisp.
%js-array-reduce¶
Bridge for Array.prototype.reduce.
Defined in src/runtime-array-core.lisp.
%js-array-reduce-right¶
Bridge for Array.prototype.reduceRight.
Defined in src/runtime-array-core.lisp.
%js-array-find¶
Return first element satisfying FN, or undefined.
Defined in src/runtime-array-core.lisp.
%js-array-find-index¶
Bridge for Array.prototype.findIndex.
Defined in src/runtime-array-core.lisp.
%js-array-every¶
Bridge for Array.prototype.every.
Defined in src/runtime-array-core.lisp.
%js-array-some¶
Bridge for Array.prototype.some.
Defined in src/runtime-array-core.lisp.
%js-array-includes¶
True if ARR contains VAL starting from FROM.
Defined in src/runtime-array-core.lisp.
%js-array-index-of¶
Return first index of VAL in ARR, or -1.
Defined in src/runtime-array-core.lisp.
%js-array-last-index-of¶
Return last index of VAL in ARR, or -1.
Defined in src/runtime-array-core.lisp.
%js-array-fill¶
Fill ARR[start..end] with VALUE.
Defined in src/runtime-array-transforms.lisp.
%js-array-copy-within¶
Copy elements within ARR.
Defined in src/runtime-array-transforms.lisp.
%js-array-entries¶
Bridge for Array.prototype.entries.
Defined in src/runtime-array-iterators.lisp.
%js-array-keys¶
Bridge for Array.prototype.keys.
Defined in src/runtime-array-iterators.lisp.
%js-array-from¶
JS Array.from — collects an iterable or array-like object into a fresh array.
Defined in src/runtime-array-from.lisp.
%js-array-from-async¶
(cl-cc/javascript:%js-array-from-async items &optional (map-fn +js-undefined+) (this-arg +js-undefined+))
ES2024 Array.fromAsync in the runtime's synchronous Promise model.
Defined in src/runtime-array-from.lisp.
%js-array-is-array¶
True if X is a JS array.
Defined in src/runtime-array-from.lisp.
Object built-ins¶
%js-object-keys¶
Bridge for Object.keys.
Defined in src/runtime-object.lisp.
%js-object-values¶
Bridge for Object.values.
Defined in src/runtime-object.lisp.
%js-object-entries¶
Bridge for Object.entries.
Defined in src/runtime-object.lisp.
%js-object-assign¶
Copy all enumerable own properties from SOURCES to TARGET.
Defined in src/runtime-object.lisp.
%js-object-create¶
Create object with PROTO as prototype.
Defined in src/runtime-object.lisp.
%js-object-define-property¶
Bridge for Object.defineProperty.
Defined in src/runtime-builtins-object.lisp.
%js-object-define-properties¶
Bridge for Object.defineProperties.
Defined in src/runtime-builtins-object.lisp.
%js-object-get-prototype-of¶
Return prototype of OBJ.
Defined in src/runtime-object.lisp.
%js-object-set-prototype-of¶
Set prototype of OBJ.
Defined in src/runtime-object.lisp.
%js-object-get-own-property-descriptor¶
Bridge for Object.getOwnPropertyDescriptor.
Defined in src/runtime-builtins-object.lisp.
%js-object-has-own¶
True if OBJ has own property KEY.
Defined in src/runtime-object.lisp.
%js-object-from-entries¶
Create object from [key, value] iterable.
Defined in src/runtime-object.lisp.
%js-object-is¶
Object.is — like === but handles NaN and -0.
Defined in src/runtime-object-ops.lisp.
String built-ins (ES2015+, ES2024)¶
%js-string-substring¶
JS String.prototype.substring (clamps, swaps start>end, differs from slice).
Defined in src/runtime-string.lisp.
%js-string-to-well-formed¶
ES2024 String.prototype.toWellFormed — replace lone surrogates with U+FFFD.
Defined in src/runtime-string.lisp.
%js-string-is-well-formed¶
ES2024 String.prototype.isWellFormed — return true iff S contains no lone surrogates.
Defined in src/runtime-string.lisp.
%js-string-to-locale-lower-case¶
Bridge for String.prototype.toLocaleLowerCase.
Defined in src/runtime-string.lisp.
%js-string-to-locale-upper-case¶
Bridge for String.prototype.toLocaleUpperCase.
Defined in src/runtime-string.lisp.
%js-string-locale-compare¶
ES2015 String.prototype.localeCompare — returns -1, 0, or 1.
Defined in src/runtime-string.lisp.
%js-string-length¶
Bridge for the String.prototype.length accessor.
Defined in src/runtime-string.lisp.
%js-string-char-at¶
Bridge for String.prototype.charAt.
Defined in src/runtime-string.lisp.
%js-string-char-code-at¶
Bridge for String.prototype.charCodeAt.
Defined in src/runtime-string.lisp.
%js-string-concat¶
Bridge for String.prototype.concat.
Defined in src/runtime-string.lisp.
%js-string-includes¶
JS String.prototype.includes.
Defined in src/runtime-string.lisp.
%js-string-starts-with¶
Bridge for String.prototype.startsWith.
Defined in src/runtime-string.lisp.
%js-string-ends-with¶
Bridge for String.prototype.endsWith.
Defined in src/runtime-string.lisp.
%js-string-index-of¶
JS String.prototype.indexOf.
Defined in src/runtime-string.lisp.
%js-string-last-index-of¶
JS String.prototype.lastIndexOf.
Defined in src/runtime-string.lisp.
%js-string-match¶
Simplified string match (pattern is a string).
Defined in src/runtime-string.lisp.
%js-string-match-all¶
Simplified matchAll — returns array of match arrays.
Defined in src/runtime-string.lisp.
%js-string-replace¶
JS String.prototype.replace (string pattern only).
Defined in src/runtime-string.lisp.
%js-string-replace-all¶
JS String.prototype.replaceAll.
Defined in src/runtime-string.lisp.
%js-string-search¶
Return index of first match or -1.
Defined in src/runtime-string.lisp.
%js-string-slice¶
JS String.prototype.slice.
Defined in src/runtime-string.lisp.
%js-string-split¶
JS String.prototype.split.
Defined in src/runtime-string.lisp.
%js-string-trim¶
Bridge for String.prototype.trim.
Defined in src/runtime-string.lisp.
%js-string-trim-start¶
Bridge for String.prototype.trimStart.
Defined in src/runtime-string.lisp.
%js-string-trim-end¶
Bridge for String.prototype.trimEnd.
Defined in src/runtime-string.lisp.
%js-string-pad-start¶
Bridge for String.prototype.padStart.
Defined in src/runtime-string.lisp.
%js-string-pad-end¶
Bridge for String.prototype.padEnd.
Defined in src/runtime-string.lisp.
%js-string-repeat¶
Repeat S n times.
Defined in src/runtime-string.lisp.
%js-string-to-lower-case¶
Bridge for String.prototype.toLowerCase.
Defined in src/runtime-string.lisp.
%js-string-to-upper-case¶
Bridge for String.prototype.toUpperCase.
Defined in src/runtime-string.lisp.
%js-string-normalize¶
JS String.prototype.normalize for NFC, NFD, NFKC, and NFKD.
Defined in src/runtime-string.lisp.
%js-string-from-char-code¶
String.fromCharCode / String.fromCodePoint — both map code-char over their args.
Defined in src/runtime-string.lisp.
%js-string-from-code-point¶
Bridge for String.fromCodePoint.
Defined in src/runtime-string.lisp.
%js-string-raw¶
String.raw... tag: join raw literal portions with substitution values.
Defined in src/runtime-builtins-globals.lisp.
%js-string-at¶
JS String.prototype.at (negative indexing).
Defined in src/runtime-string.lisp.
Promise built-ins¶
%js-promise-resolve¶
Create a resolved promise.
Defined in src/runtime-promise.lisp.
%js-promise-reject¶
Create a rejected promise.
Defined in src/runtime-promise.lisp.
%js-promise-all¶
Resolve all promises; reject on first rejection.
Defined in src/runtime-promise.lisp.
%js-promise-all-settled¶
Return array of status objects for all promises.
Defined in src/runtime-promise.lisp.
%js-promise-any¶
Resolve with first fulfillment; reject if all reject.
Defined in src/runtime-promise.lisp.
%js-promise-race¶
Return the first settled promise.
Defined in src/runtime-promise.lisp.
%js-promise-with-resolvers¶
Return object with promise, resolve, reject.
Defined in src/runtime-promise.lisp.
%js-promise-then¶
Chain a promise through on-fulfilled / on-rejected callbacks.
Defined in src/runtime-promise.lisp.
Set built-ins¶
js-set-p¶
True when OBJECT is a js-set structure.
Defined in src/runtime-collections-set.lisp.
%js-make-set¶
Create a new empty ordered JS Set.
Defined in src/runtime-collections-set.lisp.
%js-set-add¶
Bridge for Set.prototype.add.
Defined in src/runtime-collections-set.lisp.
%js-set-delete¶
Bridge for Set.prototype.delete.
Defined in src/runtime-collections-set.lisp.
%js-set-has¶
Bridge for Set.prototype.has.
Defined in src/runtime-collections-set.lisp.
%js-set-clear¶
Bridge for Set.prototype.clear.
Defined in src/runtime-collections-set.lisp.
%js-set-size¶
Bridge for the Set.prototype.size accessor.
Defined in src/runtime-collections-set.lisp.
%js-set-entries¶
Bridge for Set.prototype.entries.
Defined in src/runtime-collections-set.lisp.
%js-set-keys¶
Bridge for Set.prototype.keys.
Defined in src/runtime-collections-set.lisp.
%js-set-for-each¶
Bridge for Set.prototype.forEach.
Defined in src/runtime-collections-set.lisp.
%js-set-union¶
Bridge for Set.prototype.union.
Defined in src/runtime-collections-set.lisp.
%js-set-intersection¶
Bridge for Set.prototype.intersection.
Defined in src/runtime-collections-set.lisp.
%js-set-difference¶
Bridge for Set.prototype.difference.
Defined in src/runtime-collections-set.lisp.
%js-set-symmetric-difference¶
Bridge for Set.prototype.symmetricDifference.
Defined in src/runtime-collections-set.lisp.
%js-set-is-subset-of¶
Bridge for Set.prototype.isSubsetOf.
Defined in src/runtime-collections-set.lisp.
%js-set-is-disjoint-from¶
Bridge for Set.prototype.isDisjointFrom.
Defined in src/runtime-collections-set.lisp.
%js-set-is-superset-of¶
Bridge for Set.prototype.isSupersetOf.
Defined in src/runtime-collections-set.lisp.
Map built-ins (ES2015+)¶
%js-map-p¶
True when X is a JS Map.
Defined in src/runtime-map.lisp.
%js-make-map¶
Create a JS Map, optionally seeded from an iterable of [key,val] pairs.
Defined in src/runtime-map.lisp.
%js-map-set¶
Set KEY → VALUE in Map M, preserving insertion order.
Defined in src/runtime-map.lisp.
%js-map-get¶
Return value at KEY in Map M, or undefined.
Defined in src/runtime-map.lisp.
%js-map-has¶
True if Map M has KEY.
Defined in src/runtime-map.lisp.
%js-map-delete¶
Remove KEY from Map M; return true if it existed.
Defined in src/runtime-map.lisp.
%js-map-clear¶
Remove all entries from Map M.
Defined in src/runtime-map.lisp.
%js-map-size¶
Bridge for the Map.prototype.size accessor.
Defined in src/runtime-map.lisp.
%js-map-keys¶
Bridge for Map.prototype.keys.
Defined in src/runtime-map.lisp.
%js-map-values¶
Bridge for Map.prototype.values.
Defined in src/runtime-map.lisp.
%js-map-entries¶
Bridge for Map.prototype.entries.
Defined in src/runtime-map.lisp.
%js-map-for-each¶
Call FN(value, key, map) for each entry in insertion order.
Defined in src/runtime-map.lisp.
WeakMap built-ins (ES2015+)¶
%js-weak-map-p¶
True when X is a JS WeakMap.
Defined in src/runtime-weak-collections.lisp.
%js-make-weak-map¶
Construct an empty JS WeakMap.
Defined in src/runtime-weak-collections.lisp.
%js-weak-map-set¶
Bridge for WeakMap.prototype.set.
Defined in src/runtime-weak-collections.lisp.
%js-weak-map-get¶
Bridge for WeakMap.prototype.get.
Defined in src/runtime-weak-collections.lisp.
%js-weak-map-has¶
Bridge for WeakMap.prototype.has.
Defined in src/runtime-weak-collections.lisp.
%js-weak-map-delete¶
Bridge for WeakMap.prototype.delete.
Defined in src/runtime-weak-collections.lisp.
WeakSet built-ins (ES2015+)¶
%js-weak-set-p¶
True when X is a JS WeakSet.
Defined in src/runtime-weak-collections.lisp.
%js-make-weak-set¶
Construct an empty JS WeakSet.
Defined in src/runtime-weak-collections.lisp.
%js-weak-set-add¶
Bridge for WeakSet.prototype.add.
Defined in src/runtime-weak-collections.lisp.
%js-weak-set-has¶
Bridge for WeakSet.prototype.has.
Defined in src/runtime-weak-collections.lisp.
%js-weak-set-delete¶
Bridge for WeakSet.prototype.delete.
Defined in src/runtime-weak-collections.lisp.
WeakRef / FinalizationRegistry (ES2021)¶
%js-make-weak-ref¶
Create a WeakRef.
Defined in src/runtime-weak-collections.lisp.
%js-weak-ref-deref¶
WeakRef.prototype.deref. Returns the referent, which this portable runtime always retains.
Defined in src/runtime-weak-collections.lisp.
%js-make-finalization-registry¶
Construct a JS FinalizationRegistry holding CALLBACK. Registrations are tracked so unregister has observable state, but cleanup callbacks are never run by this runtime.
Defined in src/runtime-weak-collections.lisp.
%js-finreg-register¶
(cl-cc/javascript:%js-finreg-register reg target held-value &optional (unregister-token +js-undefined+))
Register TARGET with HELD-VALUE.
Defined in src/runtime-weak-collections.lisp.
%js-finreg-unregister¶
Remove all registrations associated with TOKEN, returning true if any existed.
Defined in src/runtime-weak-collections.lisp.
Symbol (ES2015+)¶
%js-symbol-p¶
True when X is a JS Symbol.
Defined in src/runtime-symbol.lisp.
%js-make-symbol¶
JS Symbol([description]) — always returns a fresh unique symbol.
Defined in src/runtime-symbol.lisp.
%js-symbol-for¶
Symbol.for(key) — returns the registered symbol for KEY, creating it if absent.
Defined in src/runtime-symbol.lisp.
%js-symbol-key-for¶
Symbol.keyFor(sym) — return the registry key for SYM, or undefined.
Defined in src/runtime-symbol.lisp.
%js-symbol-to-string¶
Symbol.prototype.toString → 'Symbol(desc)'.
Defined in src/runtime-symbol.lisp.
%js-symbol-description¶
Symbol.prototype.description getter.
Defined in src/runtime-symbol.lisp.
%js-symbol-as-key¶
Convert a JS symbol to its hash-table storage key (string form).
Defined in src/runtime-symbol.lisp.
*js-symbol-registry*¶
Global symbol registry mapping string keys to js-symbol instances.
Defined in src/runtime-symbol.lisp.
*js-symbol-global*¶
The global Symbol object (callable + static methods).
Defined in src/runtime-symbol.lisp.
TypedArray (ES2015+)¶
%js-make-typed-array¶
Construct a TypedArray of TYPE-NAME.
Defined in src/runtime-typed-arrays.lisp.
%js-ta-get¶
Get element at INDEX from TypedArray TA.
Defined in src/runtime-typed-arrays.lisp.
%js-ta-set¶
Set element at INDEX in TypedArray TA to VALUE.
Defined in src/runtime-typed-arrays.lisp.
%js-ta-to-array¶
Convert TypedArray to plain JS array.
Defined in src/runtime-typed-arrays-methods.lisp.
*js-typed-array-method-table*¶
TypedArray.prototype method dispatch.
Defined in src/runtime-typed-arrays-methods-es2023.lisp.
RegExp (ES2015+ native engine)¶
%js-regex-exec¶
Execute RE against STR starting at START.
Defined in src/runtime-regex-api.lisp.
%js-regex-test¶
RegExp.prototype.test(str) — return t if match found.
Defined in src/runtime-regex-api.lisp.
%js-string-match-regex¶
String.prototype.match(regexp).
Defined in src/runtime-regex-api.lisp.
%js-string-search-regex¶
String.prototype.search(regexp) — return index or -1.
Defined in src/runtime-regex-api.lisp.
%js-string-replace-regex¶
String.prototype.replace(regexp, replacement).
Defined in src/runtime-regex-api.lisp.
%js-string-replace-all-regex¶
String.prototype.replaceAll with regex (must have /g flag).
Defined in src/runtime-regex-api.lisp.
%js-string-split-regex¶
String.prototype.split with regex separator.
Defined in src/runtime-regex-api.lisp.
ES2023 Array methods¶
%js-array-to-reversed¶
Array.prototype.toReversed() — return reversed copy.
Defined in src/runtime-array-es2023.lisp.
%js-array-to-sorted¶
Array.prototype.toSorted([compareFn]) — return sorted copy (stable, non-mutating).
Defined in src/runtime-array-es2023.lisp.
%js-array-to-spliced¶
(cl-cc/javascript:%js-array-to-spliced arr start &optional (delete-count nil delete-count-supplied-p) &rest items)
Array.prototype.toSpliced(start, deleteCount, ...items) — return modified copy.
Defined in src/runtime-array-es2023.lisp.
%js-array-with¶
Array.prototype.with(index, value) — return copy with element replaced.
Defined in src/runtime-array-es2023.lisp.
%js-array-find-last¶
Array.prototype.findLast(pred) -- last element satisfying PRED, or undefined.
Defined in src/runtime-array-es2023.lisp.
%js-array-find-last-index¶
Bridge for Array.prototype.findLastIndex.
Defined in src/runtime-array-es2023.lisp.
%js-array-at¶
Array.prototype.at(index) — supports negative indices.
Defined in src/runtime-array-es2023.lisp.
%js-array-of¶
Array.of(...elements) — create array from positional arguments.
Defined in src/runtime-array-es2023.lisp.
Date (ES2015+)¶
%js-date-p¶
True when X is a JS Date.
Defined in src/runtime-date.lisp.
%js-make-date¶
Construct a JS Date object.
Defined in src/runtime-date.lisp.
%js-date-now¶
Return current time as milliseconds since the Unix epoch (Date.now()).
Defined in src/runtime-date.lisp.
%js-date-get-time¶
Date.prototype.getTime() → milliseconds since Unix epoch.
Defined in src/runtime-date.lisp.
%js-date-get-full-year¶
Bridge for Date.prototype.getFullYear.
Defined in src/runtime-date.lisp.
%js-date-get-month¶
Bridge for Date.prototype.getMonth.
Defined in src/runtime-date.lisp.
%js-date-get-date¶
Bridge for Date.prototype.getDate.
Defined in src/runtime-date.lisp.
%js-date-get-hours¶
Bridge for Date.prototype.getHours.
Defined in src/runtime-date.lisp.
%js-date-get-minutes¶
Bridge for Date.prototype.getMinutes.
Defined in src/runtime-date.lisp.
%js-date-get-seconds¶
Bridge for Date.prototype.getSeconds.
Defined in src/runtime-date.lisp.
%js-date-get-day¶
Bridge for Date.prototype.getDay.
Defined in src/runtime-date.lisp.
%js-date-to-iso-string¶
Date.prototype.toISOString() → 'YYYY-MM-DDTHH:MM:SS.mmmZ'.
Defined in src/runtime-date-methods.lisp.
%js-date-to-string¶
Date.prototype.toString() — simplified.
Defined in src/runtime-date-methods.lisp.
*js-date-method-table*¶
Alist of Date.prototype method name -> host function.
Defined in src/runtime-date-methods.lisp.
Well-known symbols¶
%js-symbol-iterator¶
Symbol.iterator — used by for...of and spread.
Defined in src/runtime-symbol.lisp.
%js-symbol-to-primitive¶
Symbol.toPrimitive — type coercion hook.
Defined in src/runtime-symbol.lisp.
%js-symbol-to-string-tag¶
Symbol.toStringTag — Object.prototype.toString tag.
Defined in src/runtime-symbol.lisp.
%js-symbol-has-instance¶
Symbol.hasInstance — instanceof hook.
Defined in src/runtime-symbol.lisp.
%js-symbol-species¶
Symbol.species — constructor for derived objects.
Defined in src/runtime-symbol.lisp.
%js-symbol-async-iterator¶
Symbol.asyncIterator — async iteration protocol.
Defined in src/runtime-symbol.lisp.
Object extended built-ins¶
%js-object-without-keys¶
Return a copy of OBJ without the given KEYS (vector of strings).
Defined in src/runtime-object-ops.lisp.
%js-object-group-by¶
Object.groupBy(iterable, keyFn): group values into a null-prototype object.
Defined in src/runtime-object-ops.lisp.
Iterator helpers (stage-3 / ES2025)¶
%js-iterator-map¶
Bridge for Iterator.prototype.map.
Defined in src/runtime-collections-iterators.lisp.
%js-iterator-filter¶
Bridge for Iterator.prototype.filter.
Defined in src/runtime-collections-iterators.lisp.
%js-iterator-reduce¶
Bridge for Iterator.prototype.reduce.
Defined in src/runtime-collections-iterators.lisp.
%js-iterator-take¶
Bridge for Iterator.prototype.take.
Defined in src/runtime-collections-iterators.lisp.
%js-iterator-drop¶
Bridge for Iterator.prototype.drop.
Defined in src/runtime-collections-iterators.lisp.
%js-iterator-flat-map¶
Bridge for Iterator.prototype.flatMap.
Defined in src/runtime-collections-iterators.lisp.
%js-iterator-for-each¶
Bridge for Iterator.prototype.forEach.
Defined in src/runtime-collections-iterators.lisp.
%js-iterator-some¶
Bridge for Iterator.prototype.some.
Defined in src/runtime-collections-iterators.lisp.
%js-iterator-every¶
Bridge for Iterator.prototype.every.
Defined in src/runtime-collections-iterators.lisp.
%js-iterator-find¶
Bridge for Iterator.prototype.find.
Defined in src/runtime-collections-iterators.lisp.
%js-iterator-to-array¶
Bridge for Iterator.prototype.toArray.
Defined in src/runtime-collections-iterators.lisp.
%js-add-iterator-helpers!¶
Attach ES2025 Iterator.prototype methods and @@iterator to IT.
Defined in src/runtime-collections-iterators.lisp.
%js-make-cl-iterator¶
Create a JS iterator object from a CL thunk that returns (value .
Defined in src/runtime-collections-iterators.lisp.
%js-iter-next¶
Advance iter; return (values value done-p).
Defined in src/runtime-collections-iterators.lisp.
%js-vec-to-iter¶
Create iterator over a vector.
Defined in src/runtime-collections-iterators.lisp.
Re-exported symbols¶
src/package.lisp re-exports roughly 70 symbols this repository does not define, so
that generated/using code can reference them without package-qualifying every call —
the same reasoning the %js- prefix note above gives for the runtime bridge helpers.
Each group is defined and documented by its own sibling package; this page does not
duplicate their lambda lists, since that documentation is already authoritative there
and would drift out of sync here.
- AST node constructors and accessors (
make-ast-call,make-ast-let,ast-var-name,ast-int-value,ast-call-func, and similar) — defined incl-cc-ast. The parser builds these nodes directly; see Architecture for how the frontend hands them tocl-cc's pipeline. register-backend-bridge-provider,register-backend-global-seeder,register-backend-parser,register-backend-vm-integration-installer— defined incl-cc-bootstrap. Called once, at load time, fromsrc/vm-integration.lisp, to register this frontend withcl-cc's pipeline.make-channel,send,recv— defined incl-concurrent-kit. Used bysrc/runtime-generator.lispfor a generator's suspend/resume coroutine hand-off; see that file's header comment.parse,stringify,json-parse-error,json-parse-error-position— defined incl-json-kit. BackJSON.parse/JSON.stringify(src/runtime-json.lisp).find-time-zone,format-zone-offset, and thezoned-date-time-*family — defined incl-date-kit. Back theTemporalruntime's IANA time-zone support (src/runtime-temporal*.lisp).