discourse/app/assets/javascripts/discourse-common/addon/config/environment.js
Robin Ward e80332a2bc
REFACTOR: Sync up master with changes for Ember-CLI (#11671)
The more parallel the branches, the easier the transition will be.
2021-01-12 10:13:21 -05:00

24 lines
425 B
JavaScript

export const INPUT_DELAY = 250;
let environment = "unknown";
export function setEnvironment(e) {
if (isTesting()) {
environment = "testing";
} else {
environment = e;
}
}
export function isTesting() {
return Ember.testing || environment === "testing";
}
export function isDevelopment() {
return environment === "development";
}
export function isProduction() {
return environment === "production";
}