better pretty printing of strings - removed String.prototype.__quote()

This commit is contained in:
Fabrice Bellard
2025-09-10 18:25:34 +02:00
parent 20d2b404af
commit 8a0a6e92d2
2 changed files with 58 additions and 26 deletions

View File

@@ -86,7 +86,7 @@ function toStr(a)
case "undefined":
return "undefined";
case "string":
return a.__quote();
return JSON.stringify(a);
case "number":
if (a == 0 && 1 / a < 0)
return "-0";