Skip to content

Commit 2030285

Browse files
leviscarruyadorno
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 ded1b68 commit 2030285

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
@@ -2375,6 +2375,24 @@ util.types.isBigInt64Array(new BigInt64Array()); // Returns true
23752375
util.types.isBigInt64Array(new BigUint64Array()); // Returns false
23762376
```
23772377
2378+
### `util.types.isBigIntObject(value)`
2379+
2380+
<!-- YAML
2381+
added: v10.4.0
2382+
-->
2383+
2384+
* `value` {any}
2385+
* Returns: {boolean}
2386+
2387+
Returns `true` if the value is a BigInt object, e.g. created
2388+
by `Object(BigInt(123))`.
2389+
2390+
```js
2391+
util.types.isBigIntObject(Object(BigInt(123))); // Returns true
2392+
util.types.isBigIntObject(BigInt(123)); // Returns false
2393+
util.types.isBigIntObject(123); // Returns false
2394+
```
2395+
23782396
### `util.types.isBigUint64Array(value)`
23792397
23802398
<!-- YAML

0 commit comments

Comments
 (0)