mirror of
https://github.com/zadam/trilium.git
synced 2025-10-30 18:05:55 +01:00
change in naming of SQL methods
added assert methods to note tree
This commit is contained in:
@@ -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);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user