Skip to content

Commit

Permalink
doc: add util.types.isBig{Int,Uint}64Array()
Browse files Browse the repository at this point in the history
These methods are exposed, even though the BigInt64Array and
BigUint64Array types are currently behind the --harmony-bigint
command line flag.

PR-URL: nodejs#20615
Fixes: nodejs#20602
Reviewed-By: Gus Caplan <me@gus.host>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Tiancheng "Timothy" Gu <timothygu99@gmail.com>
Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
  • Loading branch information
cjihrig committed May 9, 2018
1 parent 06dc96f commit 2246c3c
Showing 1 changed file with 38 additions and 0 deletions.
38 changes: 38 additions & 0 deletions doc/api/util.md
Original file line number Diff line number Diff line change
Expand Up @@ -1025,6 +1025,44 @@ util.types.isAsyncFunction(function foo() {}); // Returns false
util.types.isAsyncFunction(async function foo() {}); // Returns true
```

### util.types.isBigInt64Array(value)
<!-- YAML
added: v10.0.0
-->

* Returns: {boolean}

Returns `true` if the value is a `BigInt64Array` instance. The
`--harmony-bigint` command line flag is required in order to use the
`BigInt64Array` type, but it is not required in order to use
`isBigInt64Array()`.

For example:

```js
util.types.isBigInt64Array(new BigInt64Array()); // Returns true
util.types.isBigInt64Array(new BigUint64Array()); // Returns false
```

### util.types.isBigUint64Array(value)
<!-- YAML
added: v10.0.0
-->

* Returns: {boolean}

Returns `true` if the value is a `BigUint64Array` instance. The
`--harmony-bigint` command line flag is required in order to use the
`BigUint64Array` type, but it is not required in order to use
`isBigUint64Array()`.

For example:

```js
util.types.isBigUint64Array(new BigInt64Array()); // Returns false
util.types.isBigUint64Array(new BigUint64Array()); // Returns true
```

### util.types.isBooleanObject(value)
<!-- YAML
added: v10.0.0
Expand Down

0 comments on commit 2246c3c

Please sign in to comment.