1
0
mirror of https://github.com/laurent22/joplin.git synced 2025-06-27 23:28:38 +02:00

Applied prettier to code base

This commit is contained in:
Laurent Cozic
2018-03-09 17:49:35 +00:00
parent e868102c98
commit c4f19465a6
203 changed files with 13395 additions and 7927 deletions

View File

@ -1,8 +1,7 @@
class SyncTargetRegistry {
static classById(syncTargetId) {
const info = SyncTargetRegistry.reg_[syncTargetId];
if (!info) throw new Error('Invalid id: ' + syncTargetId);
if (!info) throw new Error("Invalid id: " + syncTargetId);
return info.classRef;
}
@ -21,7 +20,7 @@ class SyncTargetRegistry {
if (!this.reg_.hasOwnProperty(n)) continue;
if (this.reg_[n].name === name) return this.reg_[n].id;
}
throw new Error('Name not found: ' + name);
throw new Error("Name not found: " + name);
}
static idToMetadata(id) {
@ -29,7 +28,7 @@ class SyncTargetRegistry {
if (!this.reg_.hasOwnProperty(n)) continue;
if (this.reg_[n].id === id) return this.reg_[n];
}
throw new Error('ID not found: ' + id);
throw new Error("ID not found: " + id);
}
static idToName(id) {
@ -44,9 +43,8 @@ class SyncTargetRegistry {
}
return output;
}
}
SyncTargetRegistry.reg_ = {};
module.exports = SyncTargetRegistry;
module.exports = SyncTargetRegistry;