Move assert helper to utility

This commit is contained in:
Shaunak Kishore
2015-09-12 20:32:39 -04:00
parent 7650575a34
commit 1db6bb4eeb
3 changed files with 7 additions and 16 deletions

6
lib/assert.js Normal file
View File

@ -0,0 +1,6 @@
this.assert = function(condition, message) {
if (!condition) {
console.error(message);
throw new Error;
}
}