Skip to content

Commit 25d0134

Browse files
targosnodejs-ci
authored andcommitted
util: add type check function for BigIntObject
Also exclude isBigInt from test because `typeof value === 'bigint'` can be used instead.
1 parent c73b5f1 commit 25d0134

File tree

3 files changed

+4
-1
lines changed

3 files changed

+4
-1
lines changed

src/node_types.cc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ namespace {
1313
V(External) \
1414
V(Date) \
1515
V(ArgumentsObject) \
16+
V(BigIntObject) \
1617
V(BooleanObject) \
1718
V(NumberObject) \
1819
V(StringObject) \

test/.eslintrc.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,5 +21,6 @@ rules:
2121
# Global scoped methods and vars
2222
globals:
2323
WebAssembly: false
24+
BigInt: false
2425
BigInt64Array: false
2526
BigUint64Array: false

test/parallel/test-util-types.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ for (const [ value, _method ] of [
2323
[ new Number(), 'isNumberObject' ],
2424
[ new String(), 'isStringObject' ],
2525
[ Object(Symbol()), 'isSymbolObject' ],
26+
[ Object(BigInt(0)), 'isBigIntObject' ],
2627
[ new Error(), 'isNativeError' ],
2728
[ new RegExp() ],
2829
[ async function() {}, 'isAsyncFunction' ],
@@ -148,7 +149,7 @@ try {
148149
const exclude = [
149150
'Undefined', 'Null', 'NullOrUndefined', 'True', 'False', 'Name', 'String',
150151
'Symbol', 'Function', 'Array', 'Object', 'Boolean', 'Number', 'Int32',
151-
'Uint32'
152+
'Uint32', 'BigInt'
152153
];
153154

154155
const start = v8_h.indexOf('Value : public Data');

0 commit comments

Comments
 (0)