diff options
Diffstat (limited to 'tools/eslint/node_modules/is-my-json-valid/example.js')
-rw-r--r-- | tools/eslint/node_modules/is-my-json-valid/example.js | 18 |
1 files changed, 0 insertions, 18 deletions
diff --git a/tools/eslint/node_modules/is-my-json-valid/example.js b/tools/eslint/node_modules/is-my-json-valid/example.js deleted file mode 100644 index f70f4dfb5c..0000000000 --- a/tools/eslint/node_modules/is-my-json-valid/example.js +++ /dev/null @@ -1,18 +0,0 @@ -var validator = require('./') - -var validate = validator({ - type: 'object', - properties: { - hello: { - required: true, - type: 'string' - } - } -}) - -console.log('should be valid', validate({hello: 'world'})) -console.log('should not be valid', validate({})) - -// get the last error message by checking validate.error -// the following will print "data.hello is required" -console.log('the errors were:', validate.errors) |