ember-cli / ember-compatibility-helpers

Helpers that allow you to write backwards compat Ember addons
MIT License
25 stars 20 forks source link

Expose optional features #27

Open bendemboski opened 6 years ago

bendemboski commented 6 years ago

There is currently no public API for accessing the state of optional features at runtime, and this addon seems like the ideal place. Something like:

import { hasOptionalFeature } from 'ember-compatibility-helpers';

if (hasOptionalFeature('jquery-integration')) {
  // ...
}

I think this will either require, or else supercede https://github.com/emberjs/ember-optional-features/issues/10, but either way, should address https://github.com/emberjs/ember-optional-features/issues/10#issuecomment-421180959.

rwjblue commented 4 years ago

I totally agree.

knownasilya commented 2 years ago

Yeah, trying to write tests that work with classic and v4, and hitting this. Any ideas?