mirror of
https://github.com/discourse/discourse.git
synced 2024-12-04 20:56:18 +08:00
a95826f60c
* DEV: `Discourse.baseUri` does not exist This never could have worked - should have been `Discourse.BaseUri` if anything. * DEV: Remove Discourse.Environment * DEV: Remove `Discourse.disableMissingIconWarning` * DEV: A bunch more missing environment checks
24 lines
396 B
JavaScript
24 lines
396 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;
|
|
}
|
|
|
|
export function isDevelopment() {
|
|
return environment === "development";
|
|
}
|
|
|
|
export function isProduction() {
|
|
return environment === "production";
|
|
}
|