is-bigint
Advanced tools
Comparing version 1.0.2 to 1.0.3
@@ -8,2 +8,10 @@ # Changelog | ||
## [v1.0.3](https://github.com/inspect-js/is-bigint/compare/v1.0.2...v1.0.3) - 2021-08-06 | ||
### Commits | ||
- [Tests] use `has-tostringtag` for easier checking of Symbol.toStringTag [`3b44080`](https://github.com/inspect-js/is-bigint/commit/3b440801b69689d907b33184134f00d7e8a35f9f) | ||
- [Dev Deps] update `auto-changelog`, `eslint`, `object-inspect`, `tape` [`e4d4a6c`](https://github.com/inspect-js/is-bigint/commit/e4d4a6c2ab743b52eda906abd1ed4b0608952533) | ||
- [Fix] use `has-bigints` for more robust BigInt detection [`7bb9d7a`](https://github.com/inspect-js/is-bigint/commit/7bb9d7ab42214c12ce25e9f0cfe2af769388c3bb) | ||
## [v1.0.2](https://github.com/inspect-js/is-bigint/compare/v1.0.1...v1.0.2) - 2021-05-04 | ||
@@ -10,0 +18,0 @@ |
'use strict'; | ||
if (typeof BigInt === 'function') { | ||
var hasBigInts = require('has-bigints')(); | ||
if (hasBigInts) { | ||
var bigIntValueOf = BigInt.prototype.valueOf; | ||
@@ -5,0 +7,0 @@ var tryBigInt = function tryBigIntObject(value) { |
{ | ||
"name": "is-bigint", | ||
"version": "1.0.2", | ||
"version": "1.0.3", | ||
"description": "Is this value an ES BigInt?", | ||
@@ -39,9 +39,10 @@ "main": "index.js", | ||
"aud": "^1.1.5", | ||
"auto-changelog": "^2.2.1", | ||
"eslint": "^7.25.0", | ||
"auto-changelog": "^2.3.0", | ||
"eslint": "^7.32.0", | ||
"has-bigints": "^1.0.1", | ||
"has-symbols": "^1.0.2", | ||
"nyc": "^10.3.2", | ||
"object-inspect": "^1.10.2", | ||
"object-inspect": "^1.11.0", | ||
"safe-publish-latest": "^1.1.4", | ||
"tape": "^5.2.2" | ||
"tape": "^5.3.0" | ||
}, | ||
@@ -48,0 +49,0 @@ "auto-changelog": { |
@@ -5,4 +5,8 @@ 'use strict'; | ||
var inspect = require('object-inspect'); | ||
var isBigInt = require('..'); | ||
var hasBigInts = require('has-bigints')(); | ||
var hasSymbols = require('has-symbols')(); | ||
var hasToStringTag = require('has-tostringtag/shams')(); | ||
var isBigInt = require('../'); | ||
var debug = function (v, m) { return inspect(v) + ' ' + m; }; | ||
@@ -17,5 +21,2 @@ | ||
var hasSymbols = require('has-symbols')(); | ||
var hasBigInts = typeof BigInt === 'function'; | ||
test('non-BigInt values', function (t) { | ||
@@ -55,3 +56,3 @@ var nonBigInts = [ | ||
t.test('faked @@toStringTag', { skip: !hasBigInts || !hasSymbols || !Symbol.toStringTag }, function (st) { | ||
t.test('faked @@toStringTag', { skip: !hasBigInts || !hasToStringTag }, function (st) { | ||
var fakeBigInt = { valueOf: function () { return BigInt(42); } }; | ||
@@ -58,0 +59,0 @@ fakeBigInt[Symbol.toStringTag] = 'BigInt'; |
13816
103
10