Skip to content

Commit

Permalink
[Fix] use has-tostringtag to behave correctly in the presence of sy…
Browse files Browse the repository at this point in the history
  • Loading branch information
ljharb committed Aug 5, 2021
1 parent b9ae62b commit dc29e52
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion index.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
'use strict';

var hasToStringTag = typeof Symbol === 'function' && typeof Symbol.toStringTag === 'symbol';
var hasToStringTag = require('has-tostringtag/shams')();
var callBound = require('call-bind/callBound');

var $toString = callBound('Object.prototype.toString');
Expand Down
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,8 @@
"object"
],
"dependencies": {
"call-bind": "^1.0.2"
"call-bind": "^1.0.2",
"has-tostringtag": "^1.0.0"
},
"devDependencies": {
"@ljharb/eslint-config": "^17.6.0",
Expand Down
2 changes: 1 addition & 1 deletion test/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

var test = require('tape');
var isArguments = require('../');
var hasToStringTag = typeof Symbol === 'function' && typeof Symbol.toStringTag === 'symbol';
var hasToStringTag = require('has-tostringtag/shams')();

test('primitives', function (t) {
t.notOk(isArguments([]), 'array is not arguments');
Expand Down

0 comments on commit dc29e52

Please sign in to comment.