change in naming of SQL methods

added assert methods to note tree
This commit is contained in:
azivner
2017-12-23 11:02:38 -05:00
parent c07c18f08a
commit bd2a5f6d82
27 changed files with 139 additions and 85 deletions

View File

@@ -71,4 +71,16 @@ function now() {
function isElectron() {
return window && window.process && window.process.type;
}
function assertArguments() {
for (const i in arguments) {
assert(arguments[i], `argument ${i} should not be falsy. Argument list: ${arguments}`);
}
}
function assert(expr, message) {
if (!expr) {
throwError(message);
}
}