updated readme.md
This commit is contained in:
parent
5a69c2af78
commit
d22dcb11aa
1 changed files with 9 additions and 1 deletions
10
readme.md
10
readme.md
|
|
@ -93,7 +93,15 @@ Note: `is.number(NaN)` returns `false`. This intentionally deviates from `typeof
|
||||||
|
|
||||||
#### Built-in types
|
#### Built-in types
|
||||||
|
|
||||||
##### .array(value)
|
##### .array(value, assertion)
|
||||||
|
|
||||||
|
Returns true if `value` is an array and all of it's items match the assertion.
|
||||||
|
|
||||||
|
```js
|
||||||
|
is.array(value) // validate `value` is an array
|
||||||
|
is.array(value, is.number) // validate that value is an array and all of it's items are numbers.
|
||||||
|
```
|
||||||
|
|
||||||
##### .function(value)
|
##### .function(value)
|
||||||
##### .buffer(value)
|
##### .buffer(value)
|
||||||
##### .object(value)
|
##### .object(value)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue