util.types.isBigInt64Array()方法是util模块的内置应用程序编程接口,用于在node.js中键入对BigInt64Array的检查。
用法:
util.types.isBigInt64Array( value )
参数:此方法接受上述和以下描述的单个参数:
- value:它是必需的参数,并且可以是任何数据类型。
 
返回值:它返回一个布尔值,即如果该值为BigInt64Array,则为TRUE,否则为FALSE。
以下示例说明了Node.js中util.types.isBigInt64Array()方法的使用:
例:
// 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 
var v1 = new BigInt64Array(); 
var v2 = new BigUint64Array(); 
  
// Printing the returned value from 
// util.types.isBigInt64Array() method 
console.log(util.types.isBigInt64Array(v1)); 
console.log(util.types.isBigInt64Array(v2));输出:
true false
例:
// 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 
var v1 = new BigInt64Array(); 
var v2 = new BigUint64Array(); 
  
// 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");输出:
The passed value is a BigInt64Array. The passed value is not a BigInt64Array
注意:上面的程序将通过使用node filename.js命令。
参考: https://nodejs.org/api/util.html#util_util_types_isbigint64array_value
相关用法
- Node.js GM resize()用法及代码示例
 - Node.js GM threshold()用法及代码示例
 - Node.js GM thumbnail()用法及代码示例
 - Node.js GM transparent()用法及代码示例
 - Node.js GM lower()用法及代码示例
 - Node.js GM contrast()用法及代码示例
 - Node.js GM negative()用法及代码示例
 - Node.js GM scale()用法及代码示例
 - Node.js GM operator()用法及代码示例
 
注:本文由纯净天空筛选整理自gekcho大神的英文原创作品 Node.js | util.types.isBigInt64Array() Method。非经特殊声明,原始代码版权归原作者所有,本译文未经允许或授权,请勿转载或复制。
