bn.js 5.1.2 → 5.1.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +5 -0
- package/lib/bn.js +5 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
package/lib/bn.js
CHANGED
|
@@ -370,7 +370,11 @@
|
|
|
370
370
|
// Check Symbol.for because not everywhere where Symbol defined
|
|
371
371
|
// See https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Symbol#Browser_compatibility
|
|
372
372
|
if (typeof Symbol !== 'undefined' && typeof Symbol.for === 'function') {
|
|
373
|
-
|
|
373
|
+
try {
|
|
374
|
+
BN.prototype[Symbol.for('nodejs.util.inspect.custom')] = inspect;
|
|
375
|
+
} catch (e) {
|
|
376
|
+
BN.prototype.inspect = inspect;
|
|
377
|
+
}
|
|
374
378
|
} else {
|
|
375
379
|
BN.prototype.inspect = inspect;
|
|
376
380
|
}
|