Skip to content

Commit 689d3a3

Browse files
leviscaraduh95
authored andcommitted
doc: add isBigIntObject to documentation
Refs: #19989 Fixes: #55446 PR-URL: #55450 Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com> Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
1 parent c10c671 commit 689d3a3

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed

doc/api/util.md

+18
Original file line numberDiff line numberDiff line change
@@ -2379,6 +2379,24 @@ util.types.isBigInt64Array(new BigInt64Array()); // Returns true
23792379
util.types.isBigInt64Array(new BigUint64Array()); // Returns false
23802380
```
23812381
2382+
### `util.types.isBigIntObject(value)`
2383+
2384+
<!-- YAML
2385+
added: v10.4.0
2386+
-->
2387+
2388+
* `value` {any}
2389+
* Returns: {boolean}
2390+
2391+
Returns `true` if the value is a BigInt object, e.g. created
2392+
by `Object(BigInt(123))`.
2393+
2394+
```js
2395+
util.types.isBigIntObject(Object(BigInt(123))); // Returns true
2396+
util.types.isBigIntObject(BigInt(123)); // Returns false
2397+
util.types.isBigIntObject(123); // Returns false
2398+
```
2399+
23822400
### `util.types.isBigUint64Array(value)`
23832401
23842402
<!-- YAML

0 commit comments

Comments
 (0)