This commit is contained in:
Sven Slootweg 2024-07-14 15:59:05 +02:00
parent e979c7e64d
commit 9f1b410416
2 changed files with 5 additions and 1 deletions

View file

@ -44,6 +44,10 @@ Possible error codes:
## Changelog
### 2.0.1 (July 14, 2024)
Fixed internal typo.
### 2.0.0 (July 14, 2024)
__BREAKING:__ Replace internal string checking implementation with a faster one; the new implementation will not recognize String objects from another realm (but will still work fine with regular, non-object strings).

View file

@ -14,5 +14,5 @@ module.exports = function isString(value) {
if (typeof value !== 'object') {
return false;
}
return hasToStringTag ? string instanceof String : toStr.call(value) === strClass;
return hasToStringTag ? value instanceof String : toStr.call(value) === strClass;
};