An open API service indexing awesome lists of open source software.

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.

Awesome Lists containing this project

README

          


Travis status


Dependency status


devDependency status


npm version


jsDelivr hits


bettercodehub score


Coverage Status

## 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
```