aboutsummaryrefslogtreecommitdiff
path: root/node_modules/lodash/_baseGetTag.js
diff options
context:
space:
mode:
Diffstat (limited to 'node_modules/lodash/_baseGetTag.js')
-rw-r--r--node_modules/lodash/_baseGetTag.js28
1 files changed, 28 insertions, 0 deletions
diff --git a/node_modules/lodash/_baseGetTag.js b/node_modules/lodash/_baseGetTag.js
new file mode 100644
index 0000000..b927ccc
--- /dev/null
+++ b/node_modules/lodash/_baseGetTag.js
@@ -0,0 +1,28 @@
+var Symbol = require('./_Symbol'),
+ getRawTag = require('./_getRawTag'),
+ objectToString = require('./_objectToString');
+
+/** `Object#toString` result references. */
+var nullTag = '[object Null]',
+ undefinedTag = '[object Undefined]';
+
+/** Built-in value references. */
+var symToStringTag = Symbol ? Symbol.toStringTag : undefined;
+
+/**
+ * The base implementation of `getTag` without fallbacks for buggy environments.
+ *
+ * @private
+ * @param {*} value The value to query.
+ * @returns {string} Returns the `toStringTag`.
+ */
+function baseGetTag(value) {
+ if (value == null) {
+ return value === undefined ? undefinedTag : nullTag;
+ }
+ return (symToStringTag && symToStringTag in Object(value))
+ ? getRawTag(value)
+ : objectToString(value);
+}
+
+module.exports = baseGetTag;