We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 8a5ea55 commit 79037c7Copy full SHA for 79037c7
1 file changed
lib/stringify.js
@@ -13,8 +13,7 @@ function getAsPrimitive(value) {
13
} else if (type === "boolean") {
14
return value ? "true" : "false";
15
} else if (type === "number" && Number.isFinite(value)) {
16
- if (Math.abs(value) < 1e21) return value.toString();
17
- return encodeString(value.toString());
+ return value < 1e21 ? "" + value : encodeString("" + value);
18
}
19
20
return "";
0 commit comments