aboutsummaryrefslogtreecommitdiff
path: root/node_modules/lodash/_castArrayLikeObject.js
diff options
context:
space:
mode:
Diffstat (limited to 'node_modules/lodash/_castArrayLikeObject.js')
-rw-r--r--node_modules/lodash/_castArrayLikeObject.js14
1 files changed, 14 insertions, 0 deletions
diff --git a/node_modules/lodash/_castArrayLikeObject.js b/node_modules/lodash/_castArrayLikeObject.js
new file mode 100644
index 0000000..92c75fa
--- /dev/null
+++ b/node_modules/lodash/_castArrayLikeObject.js
@@ -0,0 +1,14 @@
+var isArrayLikeObject = require('./isArrayLikeObject');
+
+/**
+ * Casts `value` to an empty array if it's not an array like object.
+ *
+ * @private
+ * @param {*} value The value to inspect.
+ * @returns {Array|Object} Returns the cast array-like object.
+ */
+function castArrayLikeObject(value) {
+ return isArrayLikeObject(value) ? value : [];
+}
+
+module.exports = castArrayLikeObject;