From d22dcb11aaa11ed881fb966bc1947060055f7ea4 Mon Sep 17 00:00:00 2001 From: Alex Date: Mon, 20 Jul 2020 00:08:29 +0300 Subject: [PATCH] updated readme.md --- readme.md | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/readme.md b/readme.md index 98e29ca..878a3b6 100644 --- a/readme.md +++ b/readme.md @@ -93,7 +93,15 @@ Note: `is.number(NaN)` returns `false`. This intentionally deviates from `typeof #### 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) ##### .buffer(value) ##### .object(value)