From c738f465aa16fda0dcc376a2ab0c12d7b04bf82f Mon Sep 17 00:00:00 2001 From: Ryan Smith <0ryansmith1994@gmail.com> Date: Wed, 14 Dec 2016 19:30:55 +0000 Subject: [PATCH] Updates example to use checkType. --- readme.md | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/readme.md b/readme.md index 0ac404be8..29cc8fccd 100644 --- a/readme.md +++ b/readme.md @@ -12,11 +12,6 @@ npm install --save git+https://git@github.com/ryansmith94/rulr.git ## Example ```js -isString = data => - data.constructor === String; - -checkString = checkBool(isString, typeError('string')); - data = { a: 'hello', d: [{ @@ -25,7 +20,7 @@ data = { }; validateMyModel = restrictToSchema({ - a: required(checkString), + a: required(checkType(String)), d: optional(restrictToCollection(index => validateMyModel)) });