https://github.com/xotic750/is-array-like-x
Determine if a value is array like.
https://github.com/xotic750/is-array-like-x
browser ecmascript isarraylike nodejs
Last synced: 7 months ago
JSON representation
Determine if a value is array like.
- Host: GitHub
- URL: https://github.com/xotic750/is-array-like-x
- Owner: Xotic750
- License: mit
- Created: 2015-11-25T19:24:28.000Z (almost 10 years ago)
- Default Branch: master
- Last Pushed: 2023-01-04T22:47:39.000Z (almost 3 years ago)
- Last Synced: 2024-08-09T14:32:57.762Z (over 1 year ago)
- Topics: browser, ecmascript, isarraylike, nodejs
- Language: JavaScript
- Homepage:
- Size: 3.31 MB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 20
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
## is-array-like-x
Determine if a value is array like.
### `module.exports(value)` ⇒ boolean ⏏
Checks if value is array-like. A value is considered array-like if it's
not a function and has a `length` that's an integer greater than or
equal to 0 and less than or equal to `Number.MAX_SAFE_INTEGER`.
**Kind**: Exported function
**Returns**: boolean - Returns `true` if subject is array-like, else `false`.
| Param | Type | Description |
| ----- | --------------- | ------------------------ |
| value | \* | The object to be tested. |
**Example**
```js
import isArrayLike from 'is-array-like-x';
console.log(isArrayLike([1, 2, 3])); // true
console.log(isArrayLike(document.body.children)); // true
console.log(isArrayLike('abc')); // true
console.log(isArrayLike(isArrayLike)); // false
```