aboutsummaryrefslogtreecommitdiff
path: root/node_modules/lodash/_isFlattenable.js
diff options
context:
space:
mode:
Diffstat (limited to 'node_modules/lodash/_isFlattenable.js')
-rw-r--r--node_modules/lodash/_isFlattenable.js20
1 files changed, 20 insertions, 0 deletions
diff --git a/node_modules/lodash/_isFlattenable.js b/node_modules/lodash/_isFlattenable.js
new file mode 100644
index 0000000..4cc2c24
--- /dev/null
+++ b/node_modules/lodash/_isFlattenable.js
@@ -0,0 +1,20 @@
+var Symbol = require('./_Symbol'),
+ isArguments = require('./isArguments'),
+ isArray = require('./isArray');
+
+/** Built-in value references. */
+var spreadableSymbol = Symbol ? Symbol.isConcatSpreadable : undefined;
+
+/**
+ * Checks if `value` is a flattenable `arguments` object or array.
+ *
+ * @private
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is flattenable, else `false`.
+ */
+function isFlattenable(value) {
+ return isArray(value) || isArguments(value) ||
+ !!(spreadableSymbol && value && value[spreadableSymbol]);
+}
+
+module.exports = isFlattenable;