silfverorg / duns.js

Javascript schema validator
5 stars 2 forks source link

Added assert and invalid method to main Duns-object. #50

Closed silfverstrom closed 9 years ago

silfverstrom commented 9 years ago

assert, validate and invalid can now be called from root object.

Duns.validate(object, schema) // Returns true or false.
Duns.assert(object, schema) // Throws on failed 'validate'
Duns.invalid(object, schema) // Returns true if schema is invalid. Opposite of 'validate'.

closes #47