is-boolean-object
Advanced tools
Comparing version 1.0.1 to 1.1.0
@@ -8,6 +8,19 @@ # Changelog | ||
Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog). | ||
## [v1.1.0](https://github.com/inspect-js/is-boolean-object/compare/v1.0.1...v1.1.0) - 2020-12-05 | ||
## [v1.0.1](https://github.com/inspect-js/is-boolean-object/compare/v1.0.0...v1.0.1) - 2019-12-19 | ||
### Commits | ||
- [Tests] migrate tests to Github Actions [`6cdb652`](https://github.com/inspect-js/is-boolean-object/commit/6cdb652add3c6e44c2f7fe07c5ca4c0d14ddc2c1) | ||
- [Tests] run `nyc` on all tests [`9a33076`](https://github.com/inspect-js/is-boolean-object/commit/9a33076d14869bf5120a6ca3903bcb9a008cf2e5) | ||
- [Tests] add .editorconfig [`bb401c0`](https://github.com/inspect-js/is-boolean-object/commit/bb401c084416b010d64e0c5a74465b37addab31f) | ||
- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `aud`, `auto-changelog`, `tape` [`5cb2405`](https://github.com/inspect-js/is-boolean-object/commit/5cb24052ca84d840e929f05cd1fe6c03b85ec032) | ||
- [Robustness] use `call-bind` to avoid a dependency on `.call` [`76d87ae`](https://github.com/inspect-js/is-boolean-object/commit/76d87ae74235a9995d39bcf5783c04c744c34520) | ||
- [actions] add "Allow Edits" workflow [`337206a`](https://github.com/inspect-js/is-boolean-object/commit/337206af74bd7c340bc938ab6dc0535c08490b3d) | ||
- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `tape` [`11f0481`](https://github.com/inspect-js/is-boolean-object/commit/11f0481efca28a241a35d384e2a302b1bcdc9a37) | ||
- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `tape` [`b9602c8`](https://github.com/inspect-js/is-boolean-object/commit/b9602c8ca11be138722187c1fb0a5b25a57a4edc) | ||
- [Dev Deps] update `auto-changelog`, `tape`; add `aud` [`999e9e2`](https://github.com/inspect-js/is-boolean-object/commit/999e9e224d4eec8b20fc9c3431e9ba42caad79c9) | ||
- [actions] switch Automatic Rebase workflow to `pull_request_target` event [`bbb6728`](https://github.com/inspect-js/is-boolean-object/commit/bbb6728b9410f9d3e2d266523a477127e5e4c16f) | ||
## [v1.0.1](https://github.com/inspect-js/is-boolean-object/compare/v1.0.0...v1.0.1) - 2019-12-18 | ||
### Commits | ||
@@ -14,0 +27,0 @@ |
'use strict'; | ||
var boolToStr = Boolean.prototype.toString; | ||
var callBound = require('call-bind/callBound'); | ||
var $boolToStr = callBound('Boolean.prototype.toString'); | ||
var $toString = callBound('Object.prototype.toString'); | ||
var tryBooleanObject = function booleanBrandCheck(value) { | ||
try { | ||
boolToStr.call(value); | ||
$boolToStr(value); | ||
return true; | ||
@@ -13,3 +15,2 @@ } catch (e) { | ||
}; | ||
var toStr = Object.prototype.toString; | ||
var boolClass = '[object Boolean]'; | ||
@@ -25,3 +26,3 @@ var hasToStringTag = typeof Symbol === 'function' && typeof Symbol.toStringTag === 'symbol'; | ||
} | ||
return hasToStringTag && Symbol.toStringTag in value ? tryBooleanObject(value) : toStr.call(value) === boolClass; | ||
return hasToStringTag && Symbol.toStringTag in value ? tryBooleanObject(value) : $toString(value) === boolClass; | ||
}; |
{ | ||
"name": "is-boolean-object", | ||
"version": "1.0.1", | ||
"version": "1.1.0", | ||
"author": "Jordan Harband <ljharb@gmail.com>", | ||
@@ -14,8 +14,9 @@ "funding": { | ||
"pretest": "npm run lint", | ||
"test": "npm run tests-only", | ||
"tests-only": "node --harmony --es-staging test", | ||
"posttest": "npx aud --production", | ||
"coverage": "covert test/index.js", | ||
"lint": "eslint .", | ||
"eccheck": "eclint check *.js **/*.js > /dev/null", | ||
"test": "npm run tests-only && npm run test:harmony", | ||
"tests-only": "nyc tape 'test/**/*.js'", | ||
"test:harmony": "node --harmony --es-staging test", | ||
"posttest": "aud --production", | ||
"prelint": "npm run eccheck", | ||
"lint": "eslint --ext=js,mjs .", | ||
"eccheck": "eclint check $(git ls-files)", | ||
"version": "auto-changelog && git add CHANGELOG.md", | ||
@@ -38,14 +39,17 @@ "postversion": "auto-changelog && git add CHANGELOG.md && git commit --no-edit --amend && git tag -f \"v$(node -e \"console.log(require('./package.json').version)\")\"" | ||
], | ||
"dependencies": {}, | ||
"dependencies": { | ||
"call-bind": "^1.0.0" | ||
}, | ||
"devDependencies": { | ||
"@ljharb/eslint-config": "^15.0.2", | ||
"auto-changelog": "^1.16.2", | ||
"covert": "^1.1.1", | ||
"@ljharb/eslint-config": "^17.3.0", | ||
"aud": "^1.1.3", | ||
"auto-changelog": "^2.2.1", | ||
"eclint": "^2.8.1", | ||
"eslint": "^6.7.2", | ||
"eslint": "^7.15.0", | ||
"foreach": "^2.0.5", | ||
"indexof": "^0.0.1", | ||
"is": "^3.3.0", | ||
"nyc": "^10.3.2", | ||
"safe-publish-latest": "^1.1.4", | ||
"tape": "^4.12.0" | ||
"tape": "^5.0.1" | ||
}, | ||
@@ -78,4 +82,5 @@ "testling": { | ||
"commitLimit": false, | ||
"backfillLimit": false | ||
"backfillLimit": false, | ||
"hideCredit": true | ||
} | ||
} |
Sorry, the diff of this file is not supported yet
26376
18
65
1
11
+ Addedcall-bind@^1.0.0
+ Addedcall-bind@1.0.7(transitive)
+ Addeddefine-data-property@1.1.4(transitive)
+ Addedes-define-property@1.0.0(transitive)
+ Addedes-errors@1.3.0(transitive)
+ Addedfunction-bind@1.1.2(transitive)
+ Addedget-intrinsic@1.2.4(transitive)
+ Addedgopd@1.0.1(transitive)
+ Addedhas-property-descriptors@1.0.2(transitive)
+ Addedhas-proto@1.0.3(transitive)
+ Addedhas-symbols@1.0.3(transitive)
+ Addedhasown@2.0.2(transitive)
+ Addedset-function-length@1.2.2(transitive)