Skip to content

Commit aba9ba2

Browse files
authored
Show BigInt instead of BigIntExtended when using console.log (#127)
* Show BigInt instead of BigIntExtended when using console.log hashedSeed: BigIntExtended(2) [ -1252218895, -971237565 ] -> hashedSeed: -5378239198134528189n * lint
1 parent b8911c5 commit aba9ba2

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

src/datatypes/numeric.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ const { PartialReadError } = require('../utils')
22

33
class BigIntExtended extends Array {
44
valueOf () { return BigInt.asIntN(64, BigInt(this[0]) << 32n) | BigInt.asUintN(32, BigInt(this[1])) }
5+
[Symbol.for('nodejs.util.inspect.custom')] () { return this.valueOf() }
56
}
67

78
function readI64 (buffer, offset) {

0 commit comments

Comments
 (0)