From 2246c3c843efd32d8c573c0228bbc289a46c28b7 Mon Sep 17 00:00:00 2001 From: cjihrig Date: Tue, 8 May 2018 22:30:16 -0400 Subject: [PATCH] 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: https://github.com/nodejs/node/pull/20615 Fixes: https://github.com/nodejs/node/issues/20602 Reviewed-By: Gus Caplan Reviewed-By: James M Snell Reviewed-By: Tiancheng "Timothy" Gu Reviewed-By: Vse Mozhet Byt Reviewed-By: Anna Henningsen --- doc/api/util.md | 38 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) diff --git a/doc/api/util.md b/doc/api/util.md index 529f7b6fc7e3c7..b0e511c3cd4d6b 100644 --- a/doc/api/util.md +++ b/doc/api/util.md @@ -1025,6 +1025,44 @@ util.types.isAsyncFunction(function foo() {}); // Returns false util.types.isAsyncFunction(async function foo() {}); // Returns true ``` +### util.types.isBigInt64Array(value) + + +* 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) + + +* 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)