# dotcfg

> Allows you to manage namespace objects with qualified names

Latest version **1.7.6** (published 2018-04-03) · MIT license · 0 weekly downloads

## Install

```sh
npm install dotcfg
pnpm add dotcfg
yarn add dotcfg
bun add dotcfg
```

## Health

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

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

Warnings: low downloads.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.7.6 |
| Published | 2018-04-03 |
| First published | 2016-09-11 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Node | >=4.3.0 <5.0.0 \|\| >=5.10 |
| Dependencies | 1 |
| Unpacked size | 132 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 2 |
| Author | Adrian C. Miranda |
| Maintainers | adriancmiranda |
| Keywords | dot, namespace, object, notation |

## Links

- npm: https://www.npmjs.com/package/dotcfg
- Repository: https://github.com/adriancmiranda/dotcfg
- Issues: https://github.com/adriancmiranda/dotcfg/issues
- npm.io page: https://npm.io/package/dotcfg

## Dependencies (1)

- [describe-type](https://npm.io/package/describe-type.md) 0.6.4

## Alternatives

- [jsforce](https://npm.io/package/jsforce.md) — 851.2K weekly downloads
- [react-native-qrcode-svg](https://npm.io/package/react-native-qrcode-svg.md) — 693.5K weekly downloads
- [@salesforce/plugin-data](https://npm.io/package/@salesforce/plugin-data.md) — 394.9K weekly downloads
- [@backstage/plugin-search-common](https://npm.io/package/@backstage/plugin-search-common.md) — 308.5K weekly downloads
- [@chain-registry/types](https://npm.io/package/@chain-registry/types.md) — 38.4K weekly downloads

## Recent versions

- 1.7.6 (latest) — 2018-04-03
- 1.7.5 — 2018-04-03
- 1.7.4 — 2018-04-02
- 1.7.3 — 2018-04-02
- 1.7.2 — 2018-04-01
- 1.7.1 — 2018-04-01
- 1.7.0 — 2018-04-01
- 1.6.0 — 2017-10-18
- 1.5.14 — 2017-06-07
- 1.5.13 — 2017-04-03
- 1.5.12 — 2017-03-21
- 1.5.11 — 2017-03-20
- 1.5.10 — 2017-03-20
- 1.5.9 — 2017-03-20
- 1.5.8 — 2017-03-19
- … 42 more at https://npm.io/package/dotcfg/versions

## README

# dotcfg
> Allows you to manage namespace objects with qualified names.

[![stability]][stability-url] [![deps]][deps-url] [![depsci]][depsci-url] [![travis]][travis-url] [![appveyor]][appveyor-url]

## Getting Started

## Installation

```bash
npm install dotcfg --save
```

### Links to CDN

#### umd
* [dotcfg.umd.js](https://rawgit.com/adriancmiranda/dotcfg/master/dist/dotcfg.umd.js)
* [dotcfg.umd.min.js](https://cdn.rawgit.com/adriancmiranda/dotcfg/master/dist/dotcfg.umd.min.js)
* [dotcfg.umd.min.js.map](https://cdn.rawgit.com/adriancmiranda/dotcfg/master/dist/dotcfg.umd.min.js.map)
* [dotcfg.umd.min.js.gz](https://cdn.rawgit.com/adriancmiranda/dotcfg/master/dist/dotcfg.umd.min.js.gz)

#### amd
* [dotcfg.amd.js](https://rawgit.com/adriancmiranda/dotcfg/master/dist/dotcfg.amd.js)
* [dotcfg.amd.min.js](https://cdn.rawgit.com/adriancmiranda/dotcfg/master/dist/dotcfg.amd.min.js)
* [dotcfg.amd.min.js.map](https://cdn.rawgit.com/adriancmiranda/dotcfg/master/dist/dotcfg.amd.min.js.map)
* [dotcfg.amd.min.js.gz](https://cdn.rawgit.com/adriancmiranda/dotcfg/master/dist/dotcfg.amd.min.js.gz)

#### iife
* [dotcfg.iife.js](https://rawgit.com/adriancmiranda/dotcfg/master/dist/dotcfg.iife.js)
* [dotcfg.iife.min.js](https://cdn.rawgit.com/adriancmiranda/dotcfg/master/dist/dotcfg.iife.min.js)
* [dotcfg.iife.min.js.map](https://cdn.rawgit.com/adriancmiranda/dotcfg/master/dist/dotcfg.iife.min.js.map)
* [dotcfg.iife.min.js.gz](https://cdn.rawgit.com/adriancmiranda/dotcfg/master/dist/dotcfg.iife.min.js.gz)

#### cjs
* [dotcfg.cjs.js](https://rawgit.com/adriancmiranda/dotcfg/master/dist/dotcfg.cjs.js)
* [dotcfg.cjs.min.js](https://cdn.rawgit.com/adriancmiranda/dotcfg/master/dist/dotcfg.cjs.min.js)
* [dotcfg.cjs.min.js.map](https://cdn.rawgit.com/adriancmiranda/dotcfg/master/dist/dotcfg.cjs.min.js.map)
* [dotcfg.cjs.min.js.gz](https://cdn.rawgit.com/adriancmiranda/dotcfg/master/dist/dotcfg.cjs.min.js.gz)

Use this URL for dev/testing

```html
<script src="https://rawgit.com/adriancmiranda/dotcfg/master/dist/dotcfg.umd.js"></script>
```

Use this URL in production

```html
<script src="https://cdn.rawgit.com/adriancmiranda/dotcfg/master/dist/dotcfg.umd.min.js"></script>
```

### Usage:

```javascript
const dotcfg = require('dotcfg');

const NYC = dotcfg('NYC');

// SET
// ---
NYC.cfg('env.url.host', '0.0.0.0');
// => { env:{ url:{ host:'0.0.0.0' } } }

NYC.cfg('resolve.extensions.1.name', '.js');
// => { resolve:{ extensions:{ '1':{ name:'.js' } } } }

NYC.cfg('resolve.extensions[1].name', '.js');
// => { resolve:{ extensions:[undefined, { name:'.js' }] } }

NYC.cfg('watchOptions.pool', undefined);
// => { watchOptions:{} }

NYC.cfg('process[env.NODE_ENV].type', 'DEV');
// => { process:{ 'env.NODE_ENV':{ type:'DEV' } } }


// GET
// ---
NYC.cfg('env');
// <= { url:{ host:'0.0.0.0', port:3000 } } }

NYC.cfg('env.url');
// <= { host:'0.0.0.0', port:3000 }

NYC.cfg('env.url.host');
// <= '0.0.0.0'

NYC.cfg('resolve.extensions.1');
// <= { name:'.js' }

NYC.scope.resolve.extensions[1].name;
// <= '.js'

NYC.cfg(true);
/*! true: brings a deep copy of raw object. */

NYC.cfg();
/*! false/undefined: brings dotcfg object. */
```

[travis]: https://travis-ci.org/adriancmiranda/dotcfg.svg?branch=master
[travis-url]: https://travis-ci.org/adriancmiranda/dotcfg

[appveyor]: https://ci.appveyor.com/api/projects/status/hucvow1n0t3q3le3/branch/master?svg=true
[appveyor-url]: https://ci.appveyor.com/project/adriancmiranda/dotcfg/branch/master

[stability]: http://badges.github.io/stability-badges/dist/experimental.svg
[stability-url]: http://learnhtmlwithsong.com/blog/wp-content/uploads/2014/12/errors-everywhere-meme.png

[deps]: https://david-dm.org/adriancmiranda/dotcfg.svg
[deps-url]: https://david-dm.org/adriancmiranda/dotcfg

[depsci]: https://dependencyci.com/github/adriancmiranda/dotcfg/badge
[depsci-url]: https://dependencyci.com/github/adriancmiranda/dotcfg

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