mirror of
https://github.com/nodejs/node.git
synced 2026-11-09 15:11:11 -05:00
doc: add isBigIntObject to documentation
Refs: https://github.com/nodejs/node/pull/19989 Fixes: https://github.com/nodejs/node/issues/55446 PR-URL: https://github.com/nodejs/node/pull/55450 Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com> Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
This commit is contained in:
1 parent
ded1b68d10
commit
20302851a9
1 file changed
+18
@@ -2375,6 +2375,24 @@ util.types.isBigInt64Array(new BigInt64Array()); // Returns true
|
||||
util.types.isBigInt64Array(new BigUint64Array()); // Returns false
|
||||
```
|
||||
|
||||
### `util.types.isBigIntObject(value)`
|
||||
|
||||
<!-- YAML
|
||||
added: v10.4.0
|
||||
-->
|
||||
|
||||
* `value` {any}
|
||||
* Returns: {boolean}
|
||||
|
||||
Returns `true` if the value is a BigInt object, e.g. created
|
||||
by `Object(BigInt(123))`.
|
||||
|
||||
```js
|
||||
util.types.isBigIntObject(Object(BigInt(123))); // Returns true
|
||||
util.types.isBigIntObject(BigInt(123)); // Returns false
|
||||
util.types.isBigIntObject(123); // Returns false
|
||||
```
|
||||
|
||||
### `util.types.isBigUint64Array(value)`
|
||||
|
||||
<!-- YAML
|
||||
|
||||
Reference in new issue
Block a user