https://github.com/xotic750/is-length-x
Checks if `value` is a valid array-like length.
https://github.com/xotic750/is-length-x
browser islength javascript nodejs number
Last synced: about 1 year ago
JSON representation
Checks if `value` is a valid array-like length.
- Host: GitHub
- URL: https://github.com/xotic750/is-length-x
- Owner: Xotic750
- License: mit
- Created: 2017-09-03T17:05:31.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2023-01-04T23:32:52.000Z (over 3 years ago)
- Last Synced: 2025-04-30T20:09:36.469Z (about 1 year ago)
- Topics: browser, islength, javascript, nodejs, number
- Language: JavaScript
- Size: 2.53 MB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 20
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
## is-length-x
Checks if `value` is a valid array-like length.
### `module.exports(value)` ⇒ boolean ⏏
This method checks if `value` is a valid array-like length.
**Kind**: Exported function
**Returns**: boolean - Returns `true` if `value` is a valid length, else `false`.
| Param | Type | Description |
| ----- | --------------- | ------------------- |
| value | \* | The value to check. |
**Example**
```js
import isLength from 'is-length-x';
console.log(isLength(3)); // => true
console.log(isLength(Number.MIN_VALUE)); // => false
console.log(isLength(Infinity)); // => false
console.log(isLength('3')); // => false
```