aboutsummaryrefslogtreecommitdiff
path: root/node_modules/es5-ext/string/is-string.js
diff options
context:
space:
mode:
Diffstat (limited to 'node_modules/es5-ext/string/is-string.js')
-rw-r--r--node_modules/es5-ext/string/is-string.js13
1 files changed, 13 insertions, 0 deletions
diff --git a/node_modules/es5-ext/string/is-string.js b/node_modules/es5-ext/string/is-string.js
new file mode 100644
index 000000000..1b1e86309
--- /dev/null
+++ b/node_modules/es5-ext/string/is-string.js
@@ -0,0 +1,13 @@
+"use strict";
+
+var objToString = Object.prototype.toString, id = objToString.call("");
+
+module.exports = function (value) {
+ return (
+ typeof value === "string" ||
+ (value &&
+ typeof value === "object" &&
+ (value instanceof String || objToString.call(value) === id)) ||
+ false
+ );
+};