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: #20615
Fixes: #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 authored and targos committed May 12, 2018
1 parent d568952 commit c546746
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 @@ -1009,6 +1009,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 c546746

Please sign in to comment.