|
Last change
on this file was 9af201e, checked in by MBK <marija.karapandzova@…>, 12 days ago |
|
Fix frontend appearance
|
-
Property mode
set to
100644
|
|
File size:
742 bytes
|
| Rev | Line | |
|---|
| [9af201e] | 1 | var isArrayLike = require('./isArrayLike'),
|
|---|
| 2 | isObjectLike = require('./isObjectLike');
|
|---|
| 3 |
|
|---|
| 4 | /**
|
|---|
| 5 | * This method is like `_.isArrayLike` except that it also checks if `value`
|
|---|
| 6 | * is an object.
|
|---|
| 7 | *
|
|---|
| 8 | * @static
|
|---|
| 9 | * @memberOf _
|
|---|
| 10 | * @since 4.0.0
|
|---|
| 11 | * @category Lang
|
|---|
| 12 | * @param {*} value The value to check.
|
|---|
| 13 | * @returns {boolean} Returns `true` if `value` is an array-like object,
|
|---|
| 14 | * else `false`.
|
|---|
| 15 | * @example
|
|---|
| 16 | *
|
|---|
| 17 | * _.isArrayLikeObject([1, 2, 3]);
|
|---|
| 18 | * // => true
|
|---|
| 19 | *
|
|---|
| 20 | * _.isArrayLikeObject(document.body.children);
|
|---|
| 21 | * // => true
|
|---|
| 22 | *
|
|---|
| 23 | * _.isArrayLikeObject('abc');
|
|---|
| 24 | * // => false
|
|---|
| 25 | *
|
|---|
| 26 | * _.isArrayLikeObject(_.noop);
|
|---|
| 27 | * // => false
|
|---|
| 28 | */
|
|---|
| 29 | function isArrayLikeObject(value) {
|
|---|
| 30 | return isObjectLike(value) && isArrayLike(value);
|
|---|
| 31 | }
|
|---|
| 32 |
|
|---|
| 33 | module.exports = isArrayLikeObject;
|
|---|
Note:
See
TracBrowser
for help on using the repository browser.