open-consul/ui/packages/consul-ui/app/services/features.js

14 lines
270 B
JavaScript

import Service, { inject as service } from '@ember/service';
export default class FeatureService extends Service {
@service env;
get features() {
return this.env.var('features');
}
isEnabled(featureName) {
return !!this.features?.[featureName];
}
}