Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit c546746

Browse filesBrowse files
cjihrigtargos
authored andcommitted
doc: add util.types.isBig{Int,Uint}64Array()
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>
1 parent d568952 commit c546746
Copy full SHA for c546746

File tree

Expand file treeCollapse file tree

1 file changed

+38
-0
lines changed
Open diff view settings
Filter options
Expand file treeCollapse file tree

1 file changed

+38
-0
lines changed
Open diff view settings
Collapse file

‎doc/api/util.md‎

Copy file name to clipboardExpand all lines: doc/api/util.md
+38Lines changed: 38 additions & 0 deletions
  • Display the source diff
  • Display the rich diff
Original file line numberDiff line numberDiff line change
@@ -1009,6 +1009,44 @@ util.types.isAsyncFunction(function foo() {}); // Returns false
10091009
util.types.isAsyncFunction(async function foo() {}); // Returns true
10101010
```
10111011

1012+
### util.types.isBigInt64Array(value)
1013+
<!-- YAML
1014+
added: v10.0.0
1015+
-->
1016+
1017+
* Returns: {boolean}
1018+
1019+
Returns `true` if the value is a `BigInt64Array` instance. The
1020+
`--harmony-bigint` command line flag is required in order to use the
1021+
`BigInt64Array` type, but it is not required in order to use
1022+
`isBigInt64Array()`.
1023+
1024+
For example:
1025+
1026+
```js
1027+
util.types.isBigInt64Array(new BigInt64Array()); // Returns true
1028+
util.types.isBigInt64Array(new BigUint64Array()); // Returns false
1029+
```
1030+
1031+
### util.types.isBigUint64Array(value)
1032+
<!-- YAML
1033+
added: v10.0.0
1034+
-->
1035+
1036+
* Returns: {boolean}
1037+
1038+
Returns `true` if the value is a `BigUint64Array` instance. The
1039+
`--harmony-bigint` command line flag is required in order to use the
1040+
`BigUint64Array` type, but it is not required in order to use
1041+
`isBigUint64Array()`.
1042+
1043+
For example:
1044+
1045+
```js
1046+
util.types.isBigUint64Array(new BigInt64Array()); // Returns false
1047+
util.types.isBigUint64Array(new BigUint64Array()); // Returns true
1048+
```
1049+
10121050
### util.types.isBooleanObject(value)
10131051
<!-- YAML
10141052
added: v10.0.0

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.