2020-04-30 00:18:21 +08:00
|
|
|
export const INPUT_DELAY = 250;
|
|
|
|
|
2020-06-02 04:33:43 +08:00
|
|
|
let environment = "unknown";
|
|
|
|
|
|
|
|
export function setEnvironment(e) {
|
|
|
|
if (isTesting()) {
|
|
|
|
environment = "testing";
|
|
|
|
} else {
|
|
|
|
environment = e;
|
|
|
|
}
|
|
|
|
}
|
2020-05-30 00:16:05 +08:00
|
|
|
|
|
|
|
export function isTesting() {
|
2021-01-12 23:13:21 +08:00
|
|
|
return Ember.testing || environment === "testing";
|
2020-05-30 00:16:05 +08:00
|
|
|
}
|
|
|
|
|
2021-01-22 04:55:39 +08:00
|
|
|
// Generally means "before we migrated to Ember CLI"
|
|
|
|
let _isLegacy = Ember.VERSION.startsWith("3.12");
|
|
|
|
export function isLegacyEmber() {
|
|
|
|
return _isLegacy;
|
|
|
|
}
|
|
|
|
|
2020-06-02 04:33:43 +08:00
|
|
|
export function isDevelopment() {
|
|
|
|
return environment === "development";
|
|
|
|
}
|
|
|
|
|
|
|
|
export function isProduction() {
|
|
|
|
return environment === "production";
|
|
|
|
}
|