From 9f1b4104163f345a20bb35c7c6ee010a5793b3ae Mon Sep 17 00:00:00 2001 From: Sven Slootweg Date: Sun, 14 Jul 2024 15:59:05 +0200 Subject: [PATCH] Fix typo --- README.md | 4 ++++ is-string.js | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 0f31708..c444897 100644 --- a/README.md +++ b/README.md @@ -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). diff --git a/is-string.js b/is-string.js index b636da0..7e67572 100644 --- a/is-string.js +++ b/is-string.js @@ -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; };