# racoon-config

> The Racoon config reader and writer.

Latest version **1.6.0** (published 2016-04-30) · MIT license · 0 weekly downloads

## Install

```sh
npm install racoon-config
pnpm add racoon-config
yarn add racoon-config
bun add racoon-config
```

## 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.6.0 |
| Published | 2016-04-30 |
| First published | 2016-04-30 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Node | >=0.8.0 |
| Dependencies | 5 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | Twitter |
| Maintainers | torworx |

## Links

- npm: https://www.npmjs.com/package/racoon-config
- Repository: https://github.com/racoonio/racoon-config
- Homepage: http://racoon.io
- Issues: https://github.com/racoonio/racoon-config/issues
- npm.io page: https://npm.io/package/racoon-config

## Dependencies (5)

- [mout](https://npm.io/package/mout.md) ^1.0.0
- [osenv](https://npm.io/package/osenv.md) ^0.1.3
- [optimist](https://npm.io/package/optimist.md) ^0.6.1
- [untildify](https://npm.io/package/untildify.md) ^2.1.0
- [graceful-fs](https://npm.io/package/graceful-fs.md) ^4.1.3

## Recent versions

- 1.6.0 (latest) — 2016-04-30

## README

# racoon-config

> The Ano config (`.racoonrc`) reader and writer.

The config spec can be read [here](https://docs.google.com/document/d/1APq7oA9tNao1UYWyOm8dKqlRP2blVkROYLZ2fLIjtWc/).


## Install

```sh
$ npm install --save racoon-config
```


## Usage

#### .load(overwrites)

Loads the racoon configuration from the configuration files.

Configuration is overwritten (after camelcase normalisation) with `overwrites` argument.

This method overwrites following environment variables:

- `HTTP_PROXY` with `proxy` configuration variable
- `HTTPS_PROXY` with `https-proxy` configuration variable
- `NO_PROXY` with `no-proxy` configuration variable

It also clears `http_proxy`, `https_proxy`, and `no_proxy` environment variables.

To restore those variables you can use `restore` method.

#### restore()

Restores environment variables overwritten by `.load` method.

#### .toObject()

Returns a deep copy of the underlying configuration object.
The returned configuration is normalised.
The object keys will be camelCase.


#### #create(cwd)

Obtains a instance where `cwd` is the current working directory (defaults to `process.cwd`);

```js
var config = require('racoon-config').create();
// You can also specify a working directory
var config2 = require('racoon-config').create('./some/path');
```

#### #read(cwd, overrides)

Alias for:

```js
var configObject = (new Config(cwd)).load(overrides).toJson();
```

## License

Released under the [MIT License](http://www.opensource.org/licenses/mit-license.php).

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