We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
Object.prototype.toString
Symbol.toStringTag
1 parent 9590e61 commit e0b8a9fCopy full SHA for e0b8a9f
2 files changed
index.js
@@ -13,7 +13,7 @@ var tryBooleanObject = function booleanBrandCheck(value) {
13
}
14
};
15
var boolClass = '[object Boolean]';
16
-var hasToStringTag = typeof Symbol === 'function' && typeof Symbol.toStringTag === 'symbol';
+var hasToStringTag = typeof Symbol === 'function' && !!Symbol.toStringTag;
17
18
module.exports = function isBoolean(value) {
19
if (typeof value === 'boolean') {
test/index.js
@@ -2,7 +2,7 @@
2
3
var test = require('tape');
4
var isBoolean = require('../');
5
-var hasSymbols = typeof Symbol === 'function' && typeof Symbol('') === 'symbol';
+var hasSymbols = require('has-symbols/shams')();
6
7
test('not Booleans', function (t) {
8
t.test('primitives', function (st) {
0 commit comments