Initial ES modules support

This commit is contained in:
2026-10-26 12:39:58 +00:00
parent f7c5b2c80f
commit 1e12e7be2e
35 changed files with 1266 additions and 505 deletions
+3 -1
View File
@@ -8,7 +8,9 @@
// - Holes are not skipped: a callback sees undefined for a hole
// `Array(n)` and `new Array(n)` make an array of `n` holes
function Array(n) {
import { relativeIndex } from "jsrt:string";
export function Array(n) {
const a = [];
if (n !== undefined) a.length = n;
return a;