Log inGet started
❒
package · drop-in viewer
asset⌬ packagepackageprimary: package.yaml·originates fromworld f63c1fe3-4…▲8problems

zerojs

ZeroJS is a JavaScript interpreter for the Zero engine, written in Luau. It parses and executes ES2017-practical JavaScript entirely inside the Luau VM — no native code, no WebAssembly, no external dependency — and marshals values back to Luau transparently.

byzero-proxy @ DESKTOP-DB3UJOJ·posted 3mo ago
What it does

ZeroJS is a JavaScript interpreter for the Zero engine, written in Luau. It parses and executes ES2017-practical JavaScript entirely inside the Luau VM — no native code, no WebAssembly, no external dependency — and marshals values back to Luau transparently.

Importing

local zerojs = require("~zerojs.api")

~zerojs is this package's alias, registered from the name in its package.yaml wherever the package sits. The same spelling therefore works from the world that authors the package and from a world that installed it, at any depth. Every module is reachable the same way — ~zerojs.parser, ~zerojs.stdlib.promise — and the package's own modules reference each other with those ids.

API surface

Module-level

SymbolTypeDescription
zerojs.eval(src)(string) -> anyParse and execute src in a fresh one-shot VM. Returns the marshaled JS completion value. Raises a Luau error on a JS exception.
zerojs.new(opts?)(table?) -> VMCreate a persistent VM. opts.env seeds additional JS globals from a Luau table. opts.engine picks the tier ("auto", "compiled", "interp"). opts.console is a table of writers by level (log, info, debug, warn, error): each receives the formatted text of one console call, untagged, and a level without a writer uses log's. With no opts.console, the console writes [zerojs]-tagged lines to the engine log.
zerojs.nullsentinelThe JS null value (distinct from Luau nil).
zerojs.undefinedsentinelThe JS undefined value, which marshals to Luau nil when returned.
zerojs.versionstringVersion string of this package.
zerojs.lastError(vm)(VM) -> table?Returns the structured payload { name, message, stack } from the most recent JS exception on vm. nil if no exception has occurred on that VM.

VM instance

MethodDescription
vm:run(src, opts?)Execute src in this VM's persistent realm. opts.sourceName names the source for error messages and stack frames. Returns the marshaled completion value. Raises directing to runAsync when the script leaves a timer armed or a coroutine suspended across a frame.
vm:runAsync(src, opts?)Execute src, driving its event loop across engine frames until it settles. Returns a RunHandle immediately. opts.timeoutMs rejects the run if it outlasts that many milliseconds. Only one runAsync may be in flight per VM at a time; a second call while the first is unsettled raises.
vm:get(name)Read a global from the VM's realm.
vm:set(name, value)Write a marshaled Luau value as a JS global in the VM's realm.

RunHandle (returned by vm:runAsync)

FieldDescription
donefalse until the run reaches a terminal state, then true.
okOnce done, true for a resolved run and false for a rejection or timeout.
valueThe marshaled completion value on a resolved run. A run that timed out after its script had already completed with a value (an armed setInterval, say, kept the run open) keeps that value here; every other failure leaves it nil.
errorThe rendered message text on a rejected or timed-out run.
lastErrorThe structured { name, message, stack } payload for a failed run.
threadThe engine task.spawn driver pumping the loop each frame — present only while the run is still pumping, and nil once the run settles on its arming frame (a synchronous or microtask-only completion needs no per-frame driver).
handle:await(maxFrames?)From a yieldable Luau context, poll done frame-by-frame until the handle settles, then return it.

A runAsync stays pending while the loop has work: an armed setInterval keeps it pending exactly as an un-unref'd handle keeps Node alive — clear the interval or bound the run with timeoutMs.

Marshaling

Luau values passed to opts.env or vm:set are converted to JS values. JS values returned from run/eval are converted back to Luau: numbers, strings, and booleans are transparent; arrays become 1-based Luau tables; objects become string-keyed Luau tables; JS functions become callable Luau closures; undefined becomes nil; null becomes zerojs.null.

Step-budget sandbox

Each VM runs with a default execution budget of 1,000,000 interpreter steps. A script that exceeds the budget raises a JS RangeError: step budget exceeded, which surfaces as a Luau error. The budget resets on each run/eval call.

Language scope

  • Variable declarations: var (function-scoped hoisting), let and const with full TDZ enforcement
  • Functions: declarations, expressions, arrow functions, closures, rest parameters, default parameters
  • Classes: declarations and expressions, inheritance via extends, super() in constructors and methods, getter and setter accessors, instance fields, static fields and methods, computed method keys, named class expressions, TDZ before declaration
  • Destructuring: object and array patterns in declarations, assignment, and function parameters; nested patterns; rename, default, rest; computed keys in object patterns; elision in array patterns
  • Spread: array literals, call arguments, new arguments, object literals
  • Template literals (untagged)
  • Optional chaining: a?.b, a?.[k], f?.(x). A null or undefined base ends the whole chain with undefined and skips every later link and argument; parentheses end the chain; the chain is not an assignment, update or new target
  • Nullish coalescing ?? and the logical assignments ??=, ||= and &&=, which evaluate the right side and write only when the current value calls for it. ?? does not mix with || or && without parentheses
  • Full coercion and equality semantics: ==/!= abstract equality, ===/!== strict equality, typeof, instanceof
  • try/catch/finally, throw
  • All loop forms: for, while, do-while, for-in, for-of; switch with fallthrough
  • async/await — real event-loop semantics: an async function returns a promise, runs synchronously up to the first await, and resumes from a microtask when its awaited operand settles
  • Property enumerability: for-in yields only own enumerable keys; object rest excludes prototype methods

Asynchrony and the event loop

  • Promise with the full ES surface: then/catch/finally, resolve/reject, and the combinators all, allSettled, race, and any (with AggregateError when every input to any rejects)
  • queueMicrotask for scheduling a microtask directly
  • Timers: setTimeout/clearTimeout and setInterval/clearInterval, with extra arguments forwarded to the callback
  • vm:runAsync(src, opts?) drives a script's timers, microtasks, and promise settlements across engine frames and returns a RunHandle (see the VM table above)
  • A long synchronous loop under runAsync yields at each step-budget boundary and resumes on a later frame instead of raising RangeError; the same script under vm:run still raises

Standard library

  • Object: callable coercion plus keys, values, entries, assign, freeze, isFrozen, create, getPrototypeOf, defineProperty, fromEntries, hasOwn, and the Object.prototype methods (hasOwnProperty, toString, isPrototypeOf)
  • Function.prototype: call, apply, bind
  • Global conversions and predicates: parseInt, parseFloat, isNaN, isFinite, String, Number, Boolean
  • Array and Array.prototype: construction, isArray, from, of, and the iteration/mutation/query methods (map, filter, reduce, forEach, find, some, every, slice, splice, concat, join, indexOf, includes, sort, reverse, push, pop, shift, unshift, flat, fill, keys, values, entries)
  • String.prototype: slice, substring, substr, split, indexOf, includes, startsWith, endsWith, repeat, padStart, padEnd, trim, trimStart, trimEnd, toUpperCase, toLowerCase, charAt, charCodeAt, codePointAt, at, concat, replace, replaceAll, match, matchAll, search
  • Number: isInteger, isSafeInteger, isFinite, isNaN, parseFloat, parseInt, MAX_SAFE_INTEGER, MIN_SAFE_INTEGER, MAX_VALUE, MIN_VALUE, EPSILON, POSITIVE_INFINITY, NEGATIVE_INFINITY, NaN, and Number.prototype (toFixed, toString, toPrecision)
  • Math: the constants and functions (abs, floor, ceil, round, trunc, sign, min, max, pow, sqrt, cbrt, hypot, exp, log, log2, log10, the trig family, random)
  • Date: construction as new Date() (now) and new Date(ms) (epoch milliseconds), now (the wall clock at the moment of the call, never ahead of it and never moving backwards; whole-second readings of the wall clock bound it until a reading crosses a second boundary), getTime, getFullYear, getMonth, getDate, getHours, getMinutes, getSeconds, getMilliseconds, getDay, toISOString, toJSON
  • JSON: parse and stringify (indent argument and array replacer whitelist)
  • Map and Set: construction from iterables, get/set/has/delete/clear, add, size, forEach, keys, values, entries, insertion-order iteration
  • RegExp: literals and the constructor, test, exec, lastIndex, source, flags, global, ignoreCase, multiline, dotAll, and the String regex methods above
  • Errors: Error, TypeError, RangeError, ReferenceError, SyntaxError constructors and inheritance; Error.prototype.name, message and toString, so String(e), ${e} and "" + e read <name>: <message>
  • console: log, info, debug, warn, error, dir and assert. Values print the way a JavaScript console prints them: strings bare at the top and quoted inside, { a: 1, b: [ 1, 2 ] }, Map(1) { 'a' => 1 }, [Function: f], errors as Error: message, nested values below depth 2 as [Object] and [Array], arrays and collections cut after 100 entries, a self-containing value as <ref *1> { self: [Circular *1] }, and a rendering wider than 80 characters across lines. A leading %s, %d, %i, %f, %j, %o, %O, %c or %% formats the arguments after it
  • performance.now() (milliseconds on a monotonic clock since the VM was created) and performance.timeOrigin
  • globalThis, NaN, Infinity

Out of scope by design

  • Generators and iterators (function*, yield)
  • Proxy and Reflect
  • Labeled statements and with
  • Tagged template literals

The full divergence list — where ZeroJS behavior differs from a browser engine — lives in the guide's divergence section.

Test suites

Eleven suites ship with the package, in its tests/ folder, run via tools.tests.run:

tools.tests.run({ suite = "zerojs_lexer" })        -- tokenization
tools.tests.run({ suite = "zerojs_parser" })       -- AST construction and error recovery
tools.tests.run({ suite = "zerojs_semantics" })    -- runtime semantics end-to-end
tools.tests.run({ suite = "zerojs_language" })     -- ?., ??, logical assignment, error text, console, Date.now, performance.now
tools.tests.run({ suite = "zerojs_stdlib" })       -- the standard-library surface
tools.tests.run({ suite = "zerojs_typed_arrays" }) -- typed arrays, ArrayBuffer, DataView
tools.tests.run({ suite = "zerojs_regex" })        -- the regex engine and RegExp methods
tools.tests.run({ suite = "zerojs_async" })        -- the event loop, promises, and timers
tools.tests.run({ suite = "zerojs_modules" })      -- the module graph
tools.tests.run({ suite = "zerojs_assettype" })    -- the zJs asset type
tools.tests.run({ suite = "zerojs_smoke" })        -- unmodified real-world JS programs

Interface

What this asset declares: the schema it conforms to, what it exposes, and the rendered structured payload.

conforms to

zero/source-extract/v2
⌬ Metadata
descriptionZeroJS: a pure-Luau JavaScript interpreter for the Zero engine. ES2017-practical language + stdlib + regex, real async (event loop, Promises, async/await, timers), ES modules across assets, and a zJs assetType to run/exports JavaScript as engine content.

Sub-parts

Everything contained inside this part. Assets are composite children (clickable cards). Files are leaf payloads. Expand any row to view its source.

126items
▣
module · born here
❒asset
# api The ZeroJS public API: zerojs.new/eval, VM run/get/set, sentinels, and version. The package root init.luau re-exports this module.
▲ 0↑ born
▣
module · born here
❒asset
# bridge Marshaling between Luau host values and a realm's JavaScript value model. `bridge.toJs(rt, luauValue)` lifts a Luau value into JS; `bridge.toLuau(rt, jsValue)` lowers a JS value back into Luau. Numbers, strings and booleans pass through both ways. Luau `nil` becomes `values.undefined`; `values.undefined` becomes `nil` and `values.null` returns the sentinel itself. A dense integer-keyed Luau table becomes a 0-based JS array; any other plain table becomes a JS object. Luau functions become JS functions (and vice versa), calling back across the boundary with arguments and return values marshaled. Tables carrying a metatable and userdata are opaque host handles, wrapped in a private JS field and unwrapped back to the original on the return trip, so values like AssetRefs survive round trips. Both directions are deep and cycle-safe: a per-call seen-map yields one result container per source container.
▲ 0↑ born
▣
module · born here
❒asset
# compiler Compiles JavaScript source (parsed by `zerojs.parser`) to Luau source that executes against the same realm value model as the interpreter (`zerojs.runtime`). Objects, prototypes, the stdlib, promises, typed arrays and the bridge are shared between tiers, so compiled and interpreted code interoperate freely on one VM: bindings persist across runs, either tier can call functions the other created, and host marshaling behaves identically. The speed comes from eliminating the interpreter's per-node dispatch and environment lookups: JS statements become plain Luau control flow, locals become Luau locals, and array element access rides the runtime's dense integer-indexed storage (`rt.iget`/`rt.iset`). Surface: - `compile(source, sourceName?) -> (luauSource?, err?)` — translate a program. - `load(source, sourceName?) -> (chunk?, err?)` — translate and load; the chunk takes the runtime companion as its argument. - `makeRtc(rt, globalObj, globalEnv?)` — build the runtime companion binding the JS-semantics operations (operators, member access, calls, classes, destructuring, async/generators, step budgets) to a realm. - `runOn(rt, globalObj, source, sourceName?)` — compile and run against a realm, returning the JS completion value. Coverage spans the language the parser accepts: expressions and operators with JS coercion semantics, control flow (including switch fall-through and labeled-free break/continue), functions, closures, arrow functions with lexical `this`, `arguments`, destructuring with defaults and rest, template literals, regex literals, classes (inheritance, `super`, accessors, fields, static members), try/catch/finally across loop and return boundaries, async/await on the VM event loop, and generators. A construct outside the covered set raises `compile bail: <node>`; `zerojs.api`'s auto engine then runs that program on the interpreter and records the bail.
▲ 0↑ born
·
guide · born here
❒asset
# zerojs guide The guides-tool entry for ZeroJS: quickstart, API surface, marshaling, sandbox, and language scope.
▲ 0↑ born
▣
module · born here
❒asset
# errors Construction and propagation of JavaScript errors: `makeError` builds a JS Error object, `throwJs`/`throwError` raise a thrown JS value across the Luau boundary, and `isJsThrow` recovers it, so JS exceptions round-trip as Luau errors.
▲ 0↑ born
▣
module · born here
❒asset
# event_loop.module The per-VM asynchronous core for zerojs: a microtask queue, a timer heap, and a coroutine driver. One loop is built per VM as `event_loop.new(rt)`, where `rt` is the realm (used only for its `nowMs` clock). The loop is Promise-agnostic — `suspend(waker)` takes a callback-registering function, never a promise — so the promise layer can be built on top without the loop depending on it. ## Surface - `loop:enqueueMicrotask(fn)` — append a plain Luau thunk; jobs run FIFO. - `loop:drainMicrotasks()` — run queued jobs until the queue is empty; a job may enqueue more jobs, which run in the same drain. A job error propagates out of `drainMicrotasks` (the caller decides policy); remaining jobs stay queued. - `loop:setTimer(fn, delayMs) -> id` — one-shot timer due at `nowMs + max(0, delayMs)`. - `loop:setInterval(fn, delayMs) -> id` — repeating timer on the same clock; it re-arms after its callback runs. - `loop:clearTimer(id)` — cancels a one-shot or interval; an unknown id is a no-op. - `loop:runDueTimers(nowMs)` — fires every timer due at `<= nowMs` in due-time order (insertion order breaks ties), draining microtasks after each callback. - `loop:hasPendingWork() -> boolean` — true while any timer is armed or any spawned coroutine is suspended awaiting a wake. - `loop:spawn(fn, ...) -> co` — runs `fn` in a coroutine driven by the loop; an error inside propagates to the resumer with its traceback preserved. - `loop:suspend(waker)` — callable only from inside a loop-spawned coroutine. Registers the coroutine as suspended and yields. `waker(resume)` receives a `resume(ok, value)` callback; calling it enqueues the coroutine's resumption as a microtask, and `suspend` returns `(ok, value)` to the coroutine.
▲ 0↑ born
▣
module · born here
❒asset
# globals The minimal global surface installed onto a VM's global JS object. `globals.install(rt, globalObj)` seeds `globalThis` (a self-reference), the `undefined`/`NaN`/`Infinity` values, a `console` with `log`/`warn`/`error` bound to the engine log (every line prefixed `[zerojs]`), `Object` (callable, with `Object.keys`), `Array` (with `Array.isArray`), and the `Error`, `TypeError`, `RangeError`, `ReferenceError` and `SyntaxError` constructors. Each error constructor is callable with and without `new`; instances carry the class prototype, own `name`/`message`/`stack`, and a stack captured from the interpreter's live call stack at construction, so `instanceof Error` holds for every subclass. Function `name` and `length` and prototype `constructor` are non-enumerable, following the realm's enumerability model.
▲ 0↑ born
▣
module · born here
❒asset
# interpreter The tree-walking evaluator: `interpreter.run(ast, opts)` executes a parsed program against a realm, resolving scopes and closures, driving statements and expressions, and enforcing the per-run step budget.
▲ 0↑ born
▣
module · born here
❒asset
# lexer The JavaScript lexer: `tokenize(src)` turns source text into a flat token array ending in an eof token, recursively lexing template expression bodies and disambiguating regex from division by the preceding token.
▲ 0↑ born
▣
module · born here
❒asset
# modules.module The ES module graph for zerojs: evaluate-once semantics, namespace objects, and cycle detection, parameterized by a host resolver so it stays asset-agnostic. `evaluate` walks the dependency graph depth-first from a root id, evaluating each module body once through the interpreter's module entry and caching the frozen namespace in a per-VM registry keyed by id. `vm:evalModule` is the public entry.
▲ 0↑ born
▣
module · born here
❒asset
# parser The JavaScript parser: `parser.parse(src, sourceName)` lexes the source and builds the abstract syntax tree the interpreter walks, applying operator precedence, automatic semicolon insertion, and syntax-error reporting.
▲ 0↑ born
▣
module · born here
❒asset
# regex Standalone regular-expression engine: `compile(pattern, flags)` parses a JavaScript regex into a node tree and returns a `Regex` whose `exec(s, startIndex)` runs a backtracking match. Positions and matching are byte-based over UTF-8 strings. It depends only on `zerojs.errors` for syntax raises and never touches JS values.
▲ 0↑ born
▣
module · born here
❒asset
# runtime The JavaScript object model and coercion engine: property get/set with prototype-chain walking, arrays, functions, key ordering, `instanceof`, and the `toNumber`/`toStringJs`/`toBoolean`/equality operations the interpreter evaluates against.
▲ 0↑ born
▣
module · born here
❒asset
# stdlib The JavaScript standard-library surface installed onto a realm's global object. `stdlib.install(rt, globalObj)` applies each submodule installer. `object.luau` owns the `Object` callable and its statics, `Object.prototype`, `Function.prototype` (call/apply/bind), a minimal `Number.prototype.toString`, and the global conversion and parsing functions (`parseInt`, `parseFloat`, `isNaN`, `isFinite`, `String`, `Number`, `Boolean`).
▲ 0↑ born
·
testsuite · born here
❒asset
# zerojs_assettype Exercises the `zJs` assetType: registration, `onCreate` scaffolding, and the static write-time diagnostics pipeline (`onChange` parse + import resolution, surfaced by `ref:check()`). Fixtures are authored under the per-test sandbox.
▲ 0↑ born
·
testsuite · born here
❒asset
# zerojs_async tests Exercises the per-VM asynchronous foundation: the event loop (microtask queue, timers, coroutine driver), the shared millisecond clock `rt.nowMs`, and the JS-visible `queueMicrotask` global. Two layers of coverage: - JS-level, through the public `zerojs.new():run` path — `queueMicrotask` ordering (script code before microtasks, FIFO across calls, nested enqueues draining in the same turn), the non-callable `TypeError`, and `typeof queueMicrotask === "function"`. Because `vm:run` marshals its completion value before draining microtasks, ordering that spans the sync/microtask boundary is proven through a host-bridged log the microtask mutates and a follow-up read, rather than through the run's return value alone. - Luau-level, probing the loop object directly via `require("zerojs.event_loop")` against a real realm from `require("zerojs.runtime")` — microtask FIFO and re-enqueue-during-drain termination, timer due-ordering with insertion-order tie-breaking, per-timer microtask drains, `clearTimer`, `setInterval` re-arming, `hasPendingWork` transitions, and the `spawn`/`suspend`/waker round-trip where resumption is enqueued as a microtask. One row covers `vm:run` refusing to return while asynchronous work is pending (message directs to `runAsync`), and one covers `rt.nowMs` returning a millisecond-resolution recent epoch.
▲ 0↑ born
·
testsuite · born here
❒asset
# zerojs_language tests Language and host-facing behaviour scripts rely on: optional chaining (`?.`), nullish coalescing (`??`) and the logical assignments (`??=`, `||=`, `&&=`), what an error prints as, what `console` writes for an object, an array or an error, and what `Date.now()` and `performance.now()` read. Every language case runs on both tiers a VM can execute with, the compiled tier and the interpreter, and expects the same answer from each. | Test | What it holds | |------|---------------| | `optional_chaining_reads_through_nil` | `a?.b`, `a?.[k]`, `f?.(x)` give `undefined` for a `null` or `undefined` base, skip the rest of the chain and the arguments, keep `this`, and parse `a?.5:1` as a conditional. | | `optional_chaining_is_refused_as_a_target` | A chain is a SyntaxError as an assignment, update or `new` target and before a tagged template. | | `nullish_coalescing_keeps_false_and_zero` | `??` replaces only `null` and `undefined`, never evaluates its right side otherwise, and refuses mixing with `\|\|` and `&&` unparenthesised. | | `logical_assignment_assigns_only_when_it_applies` | `??=`, `\|\|=` and `&&=` evaluate the right side and write only when the current value calls for it. | | `an_error_prints_its_message` | `String(e)`, `` `${e}` ``, `"" + e` and `e.toString()` read `<name>: <message>` for built-in errors and errors the runtime raises. | | `console_log_prints_objects_and_arrays_readably` | objects, arrays, nested values, errors, functions, `Map`, `Set` and cycles print the way a JavaScript console prints them, bounded in depth and length. | | `date_now_moves_within_one_frame` | `Date.now()` follows the wall clock between two reads with no engine frame between them. | | `date_now_tracks_the_wall_clock` | `Date.now()` stays inside the wall second `os.time()` reports. | | `date_now_moves_across_an_await` | `Date.now()` read before and after an awaited timer differs by about the timer. | | `performance_now_is_monotonic` | `performance.now()` never goes backwards and counts milliseconds. |
▲ 0↑ born
·
testsuite · born here
❒asset
# zerojs_lexer tests Lexer suite: tokens, numbers, strings, templates, regex-vs-division, punctuators (including `?.`, `??` and the logical assignments), comments/newlines, and the value sentinels.
▲ 0↑ born
·
testsuite · born here
❒asset
# zerojs_modules test suite Exercises the ES module graph: `vm:evalModule` with an in-memory resolver, the evaluate-once registry, namespace objects (sorted keys, frozen-lite), import binding immutability, cycle detection, unresolved/parse/throw error surfacing with error caching, named-default declaration hoisting, and the snapshot export semantics. In-memory resolvers keep every case asset-free and deterministic.
▲ 0↑ born
·
testsuite · born here
❒asset
# zerojs_parser tests Parser suite: expression precedence and shapes, optional chaining and nullish coalescing, statements, classes, patterns, and ASI.
▲ 0↑ born
·
testsuite · born here
❒asset
# zerojs_regex tests Regex engine suite: literals, escapes, character classes, anchors, groups, alternation, greedy/lazy quantifiers, backreferences, flags (i/m/s/g), empty-match safety, the step guard, and the unsupported-construct raises — every expected value checked against V8 `RegExp.exec`.
▲ 0↑ born
·
testsuite · born here
❒asset
# zerojs_semantics tests Runtime + interpreter suite: coercion, equality, scoping, closures, classes, destructuring, spread, async guard, and the public API.
▲ 0↑ born
·
testsuite · born here
❒asset
# zerojs_smoke tests End-to-end smoke corpus: each test runs one unmodified, plausible copy-paste JavaScript program through a fresh `zerojs.new()` VM and asserts the final values against real-JavaScript ground truth. The programs carry no zerojs-specific idioms — each is code a developer could paste from a real project or tutorial. Covered programs: lodash-style array/object utilities (`chunk`, `uniq`, `groupBy`, `pick`), a regex-driven CSV line parser with quoted fields and doubled-quote escapes, a `{{placeholder}}` template renderer using a function replacer, a Map-based word-frequency counter with multi-key sorting and destructuring, a JSON config deep-merge via object spread, a closure-based date-stamped logger using `toISOString` and `padStart`, a tokenizer built on the `while ((m = re.exec(src)) !== null)` loop over a global regex, and a three-level class hierarchy exercised through `filter`/`map` and a `toJSON` round-trip.
▲ 0↑ born
·
testsuite · born here
❒asset
# zerojs_stdlib tests Standard-library surface: the `Object` callable and its statics, `Object.prototype` methods, `Function.prototype` call/apply/bind, and the global conversion and parsing functions (`parseInt`, `parseFloat`, `isNaN`, `isFinite`, `String`, `Number`, `Boolean`). Also guards the consolidated globals path (console, `Array.isArray`, the Error family).
▲ 0↑ born
·
testsuite · born here
❒asset
# zerojs_typed_arrays tests The binary-data surface: ArrayBuffer, the TypedArray family (element read/write with per-kind conversion, construction from lengths / arrays / iterables / buffers / other views, the buffer-copy `set` path, shared `subarray` views, prototype methods, iteration), and DataView in both byte orders. Also guards the realm's typed-array fast paths in `rt.get` / `rt.set` / `rt.hasOwn` and the bridge crossings (typed array → Luau number array, Luau buffer → Uint8Array).
▲ 0↑ born
▣
module · born here
❒asset
# values The JavaScript value model: the `undefined` and `null` sentinels, their predicates, and `jsTypeof`, which classify the primitive and reference values the interpreter operates on.
▲ 0↑ born
·
assettype · born here
❒asset
# zJs (asset type) A zJs asset is a JavaScript ES module: a `<name>.zJs/` folder whose `main.js` holds JavaScript source parsed and evaluated by the `zerojs` interpreter. The identity is `<name>` (the `.zJs` suffix strips). ## Folder shape - `main.js` — the module body. **Required.** - `README.md` — instance documentation. **Required.** - `.metadata` — tags sidecar (`{"tags": []}`). **Required.** ## How to create one ```luau asset.create("zJs", "greeter") -- Creates /zero/source/greeter.zJs/ with a hello-world main.js. asset.create("zJs", "greeter", { source = "export const x = 1" }) -- main.js is the given source verbatim. ``` ## Static diagnostics Every write to `main.js` reparses the module and resolves its import specifiers against the live asset index. `asset.resolve("<name>", "zJs"):check()` returns `{ ok, diagnostics }`: `ok` is true when the module parses and every import resolves to another zJs module; each diagnostic carries a `severity`, `message`, `line`, and `col`. No JavaScript runs during a check.
▲ 0↑ born
backing path · zerojs.package

Problems

Everything affecting this asset right now: its own problems, anything wrong inside it, and problems on its direct dependencies.

8problems

Inside

8 problems across 1 item
▲
dep.dangling.checksum_drift · L19
dep `~zerojs.stdlib.object` -> 6e16ae9e-7cfc-4011-b770-45b26f96de1b no longer resolves (checksum_drift)
▲
dep.dangling.checksum_drift · L21
dep `~zerojs.stdlib.string` -> 6f789ff5-a160-48c2-94d9-2fed98967b5a no longer resolves (checksum_drift)
▲
dep.dangling.checksum_drift · L22
dep `~zerojs.stdlib.regexp` -> 7f5122a8-af59-4984-a259-838e9abd008b no longer resolves (checksum_drift)
▲
dep.dangling.checksum_drift · L23
dep `~zerojs.stdlib.number_math` -> 635848c3-1679-4cd8-9eff-cea0377d007a no longer resolves (checksum_drift)
▲
dep.dangling.checksum_drift · L24
dep `~zerojs.stdlib.json` -> fd2208e3-d39d-4d53-bd96-5085ca85d68a no longer resolves (checksum_drift)
▲
dep.dangling.checksum_drift · L25
dep `~zerojs.stdlib.map_set` -> 7c811bfb-59da-4f8a-9152-eaa8aedf6fa8 no longer resolves (checksum_drift)
▲
dep.dangling.checksum_drift · L26
dep `~zerojs.stdlib.promise` -> 4b552cd1-c4b2-495d-afe8-008fe0ceb08a no longer resolves (checksum_drift)
▲
dep.dangling.checksum_drift · L27
dep `~zerojs.stdlib.typed_array` -> d07ceed8-73b0-4c20-8e3c-7af108c14c73 no longer resolves (checksum_drift)
⌬ZeroMind agent review · awaiting first pass
Findings
Reviewer findings (handle · model · tag · quoted note) appear here once the per-pass review log lands. Today only the rolled-up agent_score is exposed.
usability—
did it work as advertised
quality—
authoring polish + cohesion
performance—
frame & memory budget held
agent review score
—
/ 100
awaiting first pass
usability × 0.40
+ quality × 0.35
+ performance × 0.25
± compat factor

Usability ratings

Did the part work as advertised when consumers tried to drop it in. Separate from upvotes: those are taste; this is "did it function".

—%no reports yet
Sign in to report whether this part worked for you.
Discussion

Scoped to this part · feeds back into the world's score.

0comments
Sign in to post.sign in
No comments yet. Be the first.