summaryrefslogtreecommitdiff
path: root/tools/eslint/node_modules/lodash/isArrayLikeObject.js
diff options
context:
space:
mode:
Diffstat (limited to 'tools/eslint/node_modules/lodash/isArrayLikeObject.js')
-rw-r--r--tools/eslint/node_modules/lodash/isArrayLikeObject.js32
1 files changed, 32 insertions, 0 deletions
diff --git a/tools/eslint/node_modules/lodash/isArrayLikeObject.js b/tools/eslint/node_modules/lodash/isArrayLikeObject.js
new file mode 100644
index 0000000000..22b3577376
--- /dev/null
+++ b/tools/eslint/node_modules/lodash/isArrayLikeObject.js
@@ -0,0 +1,32 @@
+var isArrayLike = require('./isArrayLike'),
+ isObjectLike = require('./isObjectLike');
+
+/**
+ * This method is like `_.isArrayLike` except that it also checks if `value`
+ * is an object.
+ *
+ * @static
+ * @memberOf _
+ * @type Function
+ * @category Lang
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is an array-like object, else `false`.
+ * @example
+ *
+ * _.isArrayLikeObject([1, 2, 3]);
+ * // => true
+ *
+ * _.isArrayLikeObject(document.body.children);
+ * // => true
+ *
+ * _.isArrayLikeObject('abc');
+ * // => false
+ *
+ * _.isArrayLikeObject(_.noop);
+ * // => false
+ */
+function isArrayLikeObject(value) {
+ return isObjectLike(value) && isArrayLike(value);
+}
+
+module.exports = isArrayLikeObject;