Skip to content

Commit

Permalink
Move static props to the top
Browse files Browse the repository at this point in the history
  • Loading branch information
LeaVerou committed Aug 5, 2024
1 parent 7c632c8 commit 5ea7d76
Showing 1 changed file with 5 additions and 7 deletions.
12 changes: 5 additions & 7 deletions src/backend.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,11 @@ Format.register(JSON);
* Base class for all backends.
*/
export default class Backend extends EventTarget {
static capabilities = {};
static _all = [];
static hooks = hooks;
static defaultFormat = "JSON";

/**
* @param {string} source - URL string describing the data location
* @param {object} o - Options
Expand All @@ -26,8 +31,6 @@ export default class Backend extends EventTarget {
this.update(source, o);
}

static capabilities = {};

static get title () {
return this.name.replace(/([a-z])([A-Z])/g, "$1 $2");
}
Expand Down Expand Up @@ -347,8 +350,6 @@ export default class Backend extends EventTarget {
}
}

static _all = [];

// Get all descendant backends
static get all () {
if (this === Backend) {
Expand Down Expand Up @@ -394,9 +395,6 @@ export default class Backend extends EventTarget {
return Class;
}

static hooks = hooks;
static defaultFormat = "JSON";

static phrase (id, ...args) {
return phrase(this, id, ...args);
}
Expand Down

0 comments on commit 5ea7d76

Please sign in to comment.