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.
Symbol
2 parents 99ae769 + c2f43de commit 429976cCopy full SHA for 429976c
big.mjs
@@ -960,11 +960,14 @@ P.toFixed = function (dp, rm) {
960
* Big.PE, or a negative exponent equal to or less than Big.NE.
961
* Omit the sign for negative zero.
962
*/
963
-P[Symbol.for('nodejs.util.inspect.custom')] = P.toJSON = P.toString = function () {
+P.toJSON = P.toString = function () {
964
var x = this,
965
Big = x.constructor;
966
return stringify(x, x.e <= Big.NE || x.e >= Big.PE, !!x.c[0]);
967
};
968
+if (typeof Symbol !== "undefined") {
969
+ P[Symbol.for('nodejs.util.inspect.custom')] = P.toJSON;
970
+}
971
972
973
/*
0 commit comments