Open br0r opened 9 years ago
Duns.assert('ninja', Duns.number(), 'Not a valid number'); // Error{name: 'Duns Error', message: 'Not a valid number'}
Otherwise you would have to do this in tests:
try { Duns.assert('ninja', Duns.number()); } catch (err) { throw new Error('Invalid number'); }
Kind of defeats the purpose with .assert
.assert
+1
Otherwise you would have to do this in tests:
Kind of defeats the purpose with
.assert