mirror of
https://github.com/zadam/trilium.git
synced 2025-10-30 18:05:55 +01:00
image sync
This commit is contained in:
@@ -79,6 +79,14 @@ function sanitizeSql(str) {
|
||||
return str.replace(/'/g, "\\'");
|
||||
}
|
||||
|
||||
function assertArguments() {
|
||||
for (const i in arguments) {
|
||||
if (!arguments[i]) {
|
||||
throw new Error(`Argument idx#${i} should not be falsy: ${arguments[i]}`);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
module.exports = {
|
||||
randomSecureToken,
|
||||
randomString,
|
||||
@@ -95,5 +103,6 @@ module.exports = {
|
||||
hash,
|
||||
isEmptyOrWhitespace,
|
||||
getDateTimeForFile,
|
||||
sanitizeSql
|
||||
sanitizeSql,
|
||||
assertArguments
|
||||
};
|
||||
Reference in New Issue
Block a user