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