Skip to content

Commit

Permalink
#173 Add Symbol.for('nodejs.util.inspect.custom')
Browse files Browse the repository at this point in the history
  • Loading branch information
MikeMcl committed Jun 3, 2022
1 parent f8ad6c9 commit 2f0b910
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion big.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -946,7 +946,7 @@ P.toFixed = function (dp, rm) {
* Big.PE, or a negative exponent equal to or less than Big.NE.
* Omit the sign for negative zero.
*/
P.toJSON = P.toString = function () {
P[Symbol.for('nodejs.util.inspect.custom')] = P.toJSON = P.toString = function () {
var x = this,
Big = x.constructor;
return stringify(x, x.e <= Big.NE || x.e >= Big.PE, !!x.c[0]);
Expand Down

0 comments on commit 2f0b910

Please sign in to comment.