silfverorg / duns.js

Javascript schema validator
5 stars 2 forks source link

Duns could have a invalid function() #40

Closed silfverstrom closed 9 years ago

silfverstrom commented 9 years ago

The invalid function would return true if a schema is invalid, the opposite of assert.

It makes some code more clean, when you are guard clausing an expression for fails.

Like,

if (Duns.string(100).invalid()) return false;