Node.js | util.types.isBigInt64Array() Method
Last Updated :
28 Apr, 2025
Improve
The util.types.isBigInt64Array() method is an inbuilt application programming interface of the util module which is used to type check for BigInt64Array in the node.js.
Syntax:
util.types.isBigInt64Array( value )
Parameters: This method accepts single parameter as mentioned above and described below:
- value: It is a required parameter and of any datatype.
Return Value: It returns a boolean value i.e. TRUE if the value is a BigInt64Array, FALSE otherwise.
The below examples illustrate the use of util.types.isBigInt64Array() method in Node.js:
Example 1:
// Node.js program to demonstrate the
// util.types.isBigInt64Array() Method
// Allocating util module
const util = require('util');
// Functions to be passed as parameter
// of utiltypes.isBigInt64Array() method
let v1 = new BigInt64Array();
let v2 = new Bigint64Array();
// Printing the returned value from
// util.types.isBigInt64Array() method
console.log(util.types.isBigInt64Array(v1));
console.log(util.types.isBigInt64Array(v2));
Output:
true false
Example:
// Node.js program to demonstrate the
// util.types.isBigInt64Array() Method
// Allocating util module
const util = require('util');
// Functions to be passed as parameter of
// utiltypes.isBigInt64Array() method
let v1 = new BigInt64Array();
let v2 = new Bigint64Array();
// Calling util.types.isBigInt64Array() method
if (util.types.isBigInt64Array(v1))
console.log("The passed value is a BigInt64Array.");
else
console.log("The passed value is not a BigInt64Array");
if (util.types.isBigInt64Array(v2))
console.log("The passed value is a BigInt64Array.");
else
console.log("The passed value is not a BigInt64Array");
Output:
The passed value is a BigInt64Array. The passed value is not a BigInt64Array
Note: The above program will compile and run by using the node filename.js command.
Reference: https://nodejs.org/api/util.html#util_util_types_isbigint64array_value