Sha256: ef7eb60ae434579576a678f7ef29b21b65d3f2ddda5f006c6681728a5064add7
Contents?: true
Size: 737 Bytes
Versions: 50
Compression:
Stored size: 737 Bytes
Contents
'use strict'; var hasBigInts = require('has-bigints')(); if (hasBigInts) { var bigIntValueOf = BigInt.prototype.valueOf; var tryBigInt = function tryBigIntObject(value) { try { bigIntValueOf.call(value); return true; } catch (e) { } return false; }; module.exports = function isBigInt(value) { if ( value === null || typeof value === 'undefined' || typeof value === 'boolean' || typeof value === 'string' || typeof value === 'number' || typeof value === 'symbol' || typeof value === 'function' ) { return false; } if (typeof value === 'bigint') { return true; } return tryBigInt(value); }; } else { module.exports = function isBigInt(value) { return false && value; }; }
Version data entries
50 entries across 50 versions & 2 rubygems