Initial ES modules support
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user