# ember-get-config

> Get `config/environment` from anywhere, even addons!!!

Latest version **2.1.1** (published 2022-07-01) · MIT license · 0 weekly downloads

## Install

```sh
npm install ember-get-config
pnpm add ember-get-config
yarn add ember-get-config
bun add ember-get-config
```

## Health

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

Positive: has types; no vulnerabilities; high quality score.

Warnings: low downloads; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 2.1.1 |
| Published | 2022-07-01 |
| First published | 2015-11-06 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | CommonJS |
| Node | 12.* \|\| 14.* \|\| >= 16 |
| Dependencies | 2 |
| Unpacked size | 559.5 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 66 |
| Maintainers | real_ate, nullnullnull |
| Keywords | ember-addon |

## Links

- npm: https://www.npmjs.com/package/ember-get-config
- Repository: https://github.com/mansona/ember-get-config
- Homepage: https://github.com/mansona/ember-get-config#readme
- Issues: https://github.com/mansona/ember-get-config/issues
- npm.io page: https://npm.io/package/ember-get-config

## Dependencies (2)

- [ember-cli-babel](https://npm.io/package/ember-cli-babel.md) ^7.26.6
- [@embroider/macros](https://npm.io/package/@embroider/macros.md) ^0.50.0 || ^1.0.0

## Recent versions

- 2.1.1 (latest) — 2022-07-01
- 1.1.0 (version-1) — 2022-08-01
- 2.1.0 — 2022-06-28
- 2.0.0 — 2022-04-22
- 1.0.4 — 2022-04-06
- 1.0.3 — 2022-04-06
- 1.0.2 — 2022-01-21
- 1.0.1 — 2022-01-17
- 1.0.0 — 2022-01-11
- 0.5.0 — 2021-10-27
- 0.4.0 — 2021-10-17
- 0.3.0 — 2020-10-06
- 0.2.4 — 2017-10-22
- 0.2.3 — 2017-09-04
- 0.2.2 — 2017-06-02
- … 18 more at https://npm.io/package/ember-get-config/versions

## README

[![npm version](https://badge.fury.io/js/ember-get-config.svg)](https://badge.fury.io/js/ember-get-config)
[![GitHub Actions Build Status](https://img.shields.io/github/workflow/status/mansona/ember-get-config/CI/master)](https://github.com/mansona/ember-get-config/actions/workflows/ci.yml?query=branch%3Amaster)

# ember-get-config

Gaining access to an app's config file from an addon can be challenging. If possible, you should always get it through the container like so:

```js
export default Ember.Component.extend({
  someFunction() {
    const config = Ember.getOwner(this).resolveRegistration('config:environment');
    . . . .
  }
});
```

If you do not have access to the container though, you can always use `ember-get-config`.

## Installation

`ember install ember-get-config`

## Usage

Simply:

```js
import config from 'ember-get-config';
```

Which allows you to do handy things like:

```js
const { environment, modulePrefix } = config;
```

Boom!

## Contributing

See the [Contributing](CONTRIBUTING.md) guide for details.

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