# quture-config

> A package to load configuration options

Latest version **2.1.1** (published 2017-07-25) · MIT license · 0 weekly downloads

## Install

```sh
npm install quture-config
pnpm add quture-config
yarn add quture-config
bun add quture-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 | 2.1.1 |
| Published | 2017-07-25 |
| First published | 2017-07-11 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 2 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | Kieron Wiltshire |
| Maintainers | kieronwiltshire |

## Links

- npm: https://www.npmjs.com/package/quture-config
- Repository: https://github.com/Quture/config
- Homepage: https://github.com/Quture/config#README
- Issues: https://github.com/Quture/config/issues
- npm.io page: https://npm.io/package/quture-config

## Dependencies (2)

- [rfr](https://npm.io/package/rfr.md) ^1.2.3
- [debug](https://npm.io/package/debug.md) ^2.6.8

## Recent versions

- 2.1.1 (latest) — 2017-07-25
- 2.1.0 — 2017-07-20
- 2.0.9 — 2017-07-18
- 2.0.8 — 2017-07-15
- 2.0.7 — 2017-07-14
- 2.0.6 — 2017-07-14
- 2.0.4 — 2017-07-14
- 2.0.3 — 2017-07-14
- 2.0.2 — 2017-07-14
- 2.0.1 — 2017-07-12
- 1.0.6 — 2017-07-12
- 1.0.5 — 2017-07-11
- 1.0.4 — 2017-07-11
- 1.0.3 — 2017-07-11
- 1.0.2 — 2017-07-11
- … 1 more at https://npm.io/package/quture-config/versions

## README

# quture-config

A package to load configuration options

---

### Introduction

The package exports a class that can be instantiated to read configuration files from any directory.
Documentation can be found [here](http://quture.readthedocs.io/en/latest/).

### Basic usage

```JavaScript

const path = require('path');
const config = require('quture-config')({
  configDir: path.join(__dirname, 'config')
});
```

```JavaScript
//
//  ./config/app.js
//        module.exports = {
//          someValue: 'hello world!'
//        }
let hasSomeValue = config.has('app.someValue');

if (hasSomeValue) {
  // true
} else {
  // false
}
```

```JavaScript
let actualSomeValue = config.get('app.someValue');
console.log(actualSomeValue);

// 'hello world!'
```

```JavaScript
let valueThatDoesntExist = config.get('app.valueThatDoesntExist', 'This will be returned as the default value instead');
console.log(valueThatDoesntExist);

// 'This will be returned as the default value instead'
```

```JavaScript
let valueThatReallyDoesntExist = config.get('app.valueThatDoesntExist');
console.log(valueThatReallyDoesntExist);

// null
```

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