How to use the ember-get-config.environment function in ember-get-config

To help you get started, we’ve selected a few ember-get-config examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github offirgolan / ember-host-manager / addon / utils / get-host.js View on Github external
export default function getHost(hostName) {
  const env = config.environment;

  hostName = isPresent(hosts.hostOverride) ? hosts.hostOverride : hostName;

  if(env === 'test') {
    return hosts['test'];
  }

  return hosts[hostName] || hosts['default'];
}
github ciena-blueplanet / ember-prop-types / addon / mixins / prop-types.js View on Github external
validatePropTypes (ctx) {
    const disabledForEnv = settings.validate === false
    const isProduction = !config || config.environment === 'production'
    const settingMissing = settings.validate === undefined

    if (
      disabledForEnv ||
      (settingMissing && isProduction)
    ) {
      return
    }

    const propTypesArray = [].concat(ctx.get('propTypes'))
    propTypesArray.forEach((propType) => {
      if (!propType) {
        return
      }

      Object.keys(propType).forEach(name => {