Add is.arrayLike() (#26)
This commit is contained in:
parent
0bafa04e77
commit
83adc096ef
3 changed files with 29 additions and 0 deletions
14
readme.md
14
readme.md
|
|
@ -160,6 +160,20 @@ Returns `true` for instances created by a ES2015 class.
|
|||
|
||||
##### .typedArray(value)
|
||||
|
||||
##### .arrayLike(value)
|
||||
|
||||
A `value` is array-like if it is not a function and has a `value.length` that is a safe integer greater than or equal to 0.
|
||||
|
||||
```js
|
||||
is.arrayLike(document.forms);
|
||||
//=> true
|
||||
|
||||
function () {
|
||||
is.arrayLike(arguments);
|
||||
//=> true
|
||||
}
|
||||
```
|
||||
|
||||
##### .inRange(value, range)
|
||||
|
||||
Check if `value` (number) is in the given `range`. The range is an array of two values, lower bound and upper bound, in no specific order.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue