'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; }; }
Name | Type | Size | Permission | Actions |
---|---|---|---|---|
.github | Folder | 0755 |
|
|
test | Folder | 0755 |
|
|
.eslintignore | File | 10 B | 0644 |
|
.eslintrc | File | 155 B | 0644 |
|
.nycrc | File | 139 B | 0644 |
|
CHANGELOG.md | File | 6.52 KB | 0644 |
|
LICENSE | File | 1.05 KB | 0644 |
|
README.md | File | 1.58 KB | 0644 |
|
index.js | File | 737 B | 0644 |
|
package.json | File | 1.5 KB | 0644 |
|