X7ROOT File Manager
Current Path:
/lib/node_modules/npm/node_modules/har-validator/node_modules/ajv
lib
/
node_modules
/
npm
/
node_modules
/
har-validator
/
node_modules
/
ajv
/
ðŸ“
..
📄
.tonic_example.js
(439 B)
📄
LICENSE
(1.06 KB)
📄
README.md
(83.59 KB)
ðŸ“
dist
ðŸ“
lib
📄
package.json
(3.84 KB)
ðŸ“
scripts
Editing: .tonic_example.js
var Ajv = require('ajv'); var ajv = new Ajv({allErrors: true}); var schema = { "properties": { "foo": { "type": "string" }, "bar": { "type": "number", "maximum": 3 } } }; var validate = ajv.compile(schema); test({"foo": "abc", "bar": 2}); test({"foo": 2, "bar": 4}); function test(data) { var valid = validate(data); if (valid) console.log('Valid!'); else console.log('Invalid: ' + ajv.errorsText(validate.errors)); }
Upload File
Create Folder