Files: ebb953020ee4430abf945a8a40aeb90b661e3fb0 / errors / sync / isPositionTypeError.js
464 bytesRaw
1 | const Validator = require('is-my-json-valid') |
2 | const schema = require('../schema/positionTypeError') |
3 | const validator = Validator(schema, {verbose: true}) |
4 | |
5 | // server is not used here. Closure pattern is just for consistency of use with other functions. |
6 | module.exports = function isPostitionTypeError (obj) { |
7 | const result = validator(obj) |
8 | |
9 | // exposes error messages provided by is-my-json-valid |
10 | isPostitionTypeError.errors = validator.errors |
11 | |
12 | return result |
13 | } |
14 |
Built with git-ssb-web