Socket
Socket
Sign inDemoInstall

@ember/edition-utils

Package Overview
Dependencies
0
Maintainers
12
Versions
4
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    @ember/edition-utils

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


Version published
Weekly downloads
118K
increased by3.14%
Maintainers
12
Created
Weekly downloads
 

Changelog

Source

v1.2.0 (2019-12-11)

:rocket: Enhancement
  • #4 Refactor edition detection for emberjs/rfcs#558. (@rwjblue)
Committers: 1

Readme

Source

@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:

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:

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.

FAQs

Last updated on 11 Dec 2019

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc