1
0
mirror of https://github.com/MikeMcl/decimal.js.git synced 2024-10-27 20:34:12 +00:00

#146 Symbol.for to Symbol['for']

This commit is contained in:
Michael Mclaughlin 2021-06-21 18:31:41 +01:00
parent 04c6c6f115
commit 0e0dcaec27

View File

@ -4858,7 +4858,7 @@
// Node and other environments that support module.exports.
} else if (typeof module != 'undefined' && module.exports) {
if (typeof Symbol == 'function' && typeof Symbol.iterator == 'symbol') {
P[Symbol.for('nodejs.util.inspect.custom')] = P.toString;
P[Symbol['for']('nodejs.util.inspect.custom')] = P.toString;
P[Symbol.toStringTag] = 'Decimal';
}