Fun fact: Can even implement parseInt/I32/I64 using generics, see #19

This commit is contained in:
dcodeIO
2018-01-30 06:05:35 +01:00
parent ab5a938ea0
commit 3924aa96ae
12 changed files with 95 additions and 248 deletions

View File

@ -98,3 +98,7 @@ globalScope["changetype"] = function changetype(value) { return value; }
String["fromCharCodes"] = function fromCharCodes(arr) { return String.fromCharCode.apply(String, arr); }
String["fromCodePoints"] = function fromCodePoints(arr) { return String.fromCodePoint.apply(String, arr); }
globalScope["parseI32"] = function parseI32(str, radix) {
return parseInt(str) | 0;
};