Open In App

Node.js | util.types.isBigInt64Array() Method

Improve
Improve
Like Article
Like
Save
Share
Report

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: 

javascript




// 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: 

javascript




// 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



Last Updated : 03 Apr, 2023
Like Article
Save Article
Previous
Next
Share your thoughts in the comments
Similar Reads