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
+9 -1
View File
@@ -1,5 +1,13 @@
import {
__rt_number_to_fixed,
__rt_number_to_string,
__rt_string_concat,
__rt_string_from_char_code,
__rt_string_to_number,
} from "jsrt:native";
// Converts any value to a number, like the spec's ToNumber
function Number(x) {
export function Number(x) {
switch (typeof x) {
case "number": return x;
case "string": return __rt_string_to_number(x);