Skip to content

Commit 2dad4af

Browse files
committed
[Refactor] use has-tostringtag to behave correctly in the presence of symbol shams
1 parent 7698261 commit 2dad4af

File tree

3 files changed

+3
-5
lines changed

3 files changed

+3
-5
lines changed

index.js

+1-2
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
11
'use strict';
22

33
var callBound = require('call-bind/callBound');
4-
var hasSymbols = require('has-symbols/shams')();
5-
var hasToStringTag = hasSymbols && !!Symbol.toStringTag;
4+
var hasToStringTag = require('has-tostringtag/shams')();
65
var has;
76
var $exec;
87
var isRegexMarker;

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@
4040
],
4141
"dependencies": {
4242
"call-bind": "^1.0.2",
43-
"has-symbols": "^1.0.2"
43+
"has-tostringtag": "^1.0.0"
4444
},
4545
"devDependencies": {
4646
"@ljharb/eslint-config": "^17.6.0",

test/index.js

+1-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
'use strict';
22

3-
var hasSymbols = require('has-symbols/shams')();
4-
var hasToStringTag = hasSymbols && !!Symbol.toStringTag;
3+
var hasToStringTag = require('has-tostringtag/shams')();
54
var forEach = require('foreach');
65
var test = require('tape');
76
var isRegex = require('..');

0 commit comments

Comments
 (0)