Skip to content

Commit

Permalink
util: add type check function for BigIntObject
Browse files Browse the repository at this point in the history
Also exclude isBigInt from test because `typeof value === 'bigint'` can
be used instead.
  • Loading branch information
targos authored and nodejs-ci committed Mar 29, 2018
1 parent 070ed3e commit 1dcce92
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 1 deletion.
1 change: 1 addition & 0 deletions src/node_types.cc
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ namespace {
V(External) \
V(Date) \
V(ArgumentsObject) \
V(BigIntObject) \
V(BooleanObject) \
V(NumberObject) \
V(StringObject) \
Expand Down
1 change: 1 addition & 0 deletions test/.eslintrc.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,5 +21,6 @@ rules:
# Global scoped methods and vars
globals:
WebAssembly: false
BigInt: false
BigInt64Array: false
BigUint64Array: false
3 changes: 2 additions & 1 deletion test/parallel/test-util-types.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ for (const [ value, _method ] of [
[ new Number(), 'isNumberObject' ],
[ new String(), 'isStringObject' ],
[ Object(Symbol()), 'isSymbolObject' ],
[ Object(BigInt(0)), 'isBigIntObject' ],
[ new Error(), 'isNativeError' ],
[ new RegExp() ],
[ async function() {}, 'isAsyncFunction' ],
Expand Down Expand Up @@ -148,7 +149,7 @@ try {
const exclude = [
'Undefined', 'Null', 'NullOrUndefined', 'True', 'False', 'Name', 'String',
'Symbol', 'Function', 'Array', 'Object', 'Boolean', 'Number', 'Int32',
'Uint32'
'Uint32', 'BigInt'
];

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

0 comments on commit 1dcce92

Please sign in to comment.