Skip to content

Commit 2f0b910

Browse files
committed
#173 Add Symbol.for('nodejs.util.inspect.custom')
1 parent f8ad6c9 commit 2f0b910

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

big.mjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -946,7 +946,7 @@ P.toFixed = function (dp, rm) {
946946
* Big.PE, or a negative exponent equal to or less than Big.NE.
947947
* Omit the sign for negative zero.
948948
*/
949-
P.toJSON = P.toString = function () {
949+
P[Symbol.for('nodejs.util.inspect.custom')] = P.toJSON = P.toString = function () {
950950
var x = this,
951951
Big = x.constructor;
952952
return stringify(x, x.e <= Big.NE || x.e >= Big.PE, !!x.c[0]);

0 commit comments

Comments
 (0)