# @ember/edition-utils

> Utilities to detect if a given edition is in use in an ember-cli application.

Latest version **1.2.0** (published 2019-12-11) · MIT license · 0 weekly downloads

## Install

```sh
npm install @ember/edition-utils
pnpm add @ember/edition-utils
yarn add @ember/edition-utils
bun add @ember/edition-utils
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.2.0 |
| Published | 2019-12-11 |
| First published | 2019-09-14 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 12.3 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 5 |
| Author | Robert Jackson |
| Maintainers | chadhietala, chancancode, dgeb, katiegengler, krisselden, locks, mmun, nullvoxpopuli, rwjblue, stefanpenner, tomdale, wycats |

## Links

- npm: https://www.npmjs.com/package/@ember/edition-utils
- Repository: https://github.com/emberjs/ember-octane-utils
- Homepage: https://github.com/emberjs/ember-octane-utils#readme
- Issues: https://github.com/emberjs/ember-octane-utils/issues
- npm.io page: https://npm.io/package/@ember/edition-utils

## Recent versions

- 1.2.0 (latest) — 2019-12-11
- 1.1.1 — 2019-09-15
- 1.1.0 — 2019-09-15
- 1.0.1 — 2019-09-14

## README

# @ember/edition-utils

This package is the officially supported mechanism for declaring and detecting
the specific edition that a given application is using.

## Usage

### Declaring Edition

In order to declare which edition of Ember your application (or addon) is compatible with
you would call `setEdition` from within your `.ember-cli.js` file. This might look something like:

```js
const { setEdition } = require('@ember/edition-utils');

setEdition('octane');

module.exports = {
  // other configuration here
}
```

### Detecting Edition

In order to detect if the currently running application is using _at least_ a
specific edition, you would call `has`. This will most commonly be used from
within various addon's to determine which blueprint code to run. For example:

```js
const { has } = require('@ember/edition-utils');

if (has('octane')) {
  // do octane stuff
} else {
  // do classic mode stuff
}
```

## License

This project is licensed under the [MIT License](LICENSE.md).

---
_Source: https://npm.io/package/@ember/edition-utils · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
