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
@@ -1,6 +1,8 @@
// Not as the spec says: it prints its first arg only, because more args need
// rest params, which need arrays
const console = {
import { __native_print_string } from "jsrt:native";
export const console = {
log(x) {
// As node does: `-0` prints as `-0`, though String(-0) is "0"
const negativeZero = typeof x === "number" && x === 0 && 1 / x < 0;