basant307/AI_Governance_Project
048
1'use strict';2 3var hasBigInts = require('has-bigints')();4 5if (hasBigInts) {6 var bigIntValueOf = BigInt.prototype.valueOf;7 /** @type {(value: object) => value is BigInt} */8 var tryBigInt = function tryBigIntObject(value) {9 try {10 bigIntValueOf.call(value);11 return true;12 } catch (e) {13 }14 return false;15 };16 17 /** @type {import('.')} */18 module.exports = function isBigInt(value) {19 if (20 value === null21 || typeof value === 'undefined'22 || typeof value === 'boolean'23 || typeof value === 'string'24 || typeof value === 'number'25 || typeof value === 'symbol'26 || typeof value === 'function'27 ) {28 return false;29 }30 if (typeof value === 'bigint') {31 return true;32 }33 34 return tryBigInt(value);35 };36} else {37 /** @type {import('.')} */38 module.exports = function isBigInt(value) {39 return false && value;40 };41}42 