# bcfg

> Config parser for bcoin

Latest version **0.2.2** (published 2023-08-31) · MIT license · 0 weekly downloads

## Install

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

## Health

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

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.2.2 |
| Published | 2023-08-31 |
| First published | 2017-10-29 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Node | >=14.0.0 |
| Dependencies | 1 |
| Unpacked size | 27.6 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 5 |
| Author | Christopher Jeffrey |
| Maintainers | chjj, nodweber, pinheadmz |
| Keywords | conf, config |

## Links

- npm: https://www.npmjs.com/package/bcfg
- Repository: https://github.com/bcoin-org/bcfg
- Issues: https://github.com/bcoin-org/bcfg/issues
- npm.io page: https://npm.io/package/bcfg

## Dependencies (1)

- [bsert](https://npm.io/package/bsert.md) ~0.0.12

## 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

- 0.2.2 (latest) — 2023-08-31
- 0.2.1 — 2023-03-07
- 0.2.0 — 2023-03-07
- 0.1.8 — 2023-03-07
- 0.1.7 — 2021-10-06
- 0.1.6 — 2019-03-21
- 0.1.5 — 2019-01-22
- 0.1.4 — 2018-11-29
- 0.1.3 — 2018-09-29
- 0.1.2 — 2018-07-19
- 0.1.1 — 2018-07-19
- 0.1.0 — 2018-06-08
- 0.0.2 — 2018-03-12
- 0.0.1 — 2017-12-29
- 0.0.0 — 2017-10-29

## README

# bcfg

Config parser (used for bcoin).

## Usage

``` js
const Config = require('bcfg');

// Will consider ~/.my-module the prefix directory.
const config = new Config('my-module', {
  alias: {
    'n': 'network'
  }
});

// Inject some custom options first.
config.inject({
  some: 'user',
  options: 'here'
});

config.load({
  // Parse URL hash
  hash: true,
  // Parse querystring
  query: true,
  // Parse environment
  env: true,
  // Parse args
  argv: true
});

// Will parse ~/.my-module/my-config.conf (throws on FS error).
config.open('my-config.conf');

// These will cast types and throw on incorrect type.
console.log(config.str('username'));
console.log(config.str('password'));
console.log(config.uint('userid'));
console.log(config.float('percent'));
console.log(config.bool('initialize'));
```

## Contribution and License Agreement

If you contribute code to this project, you are implicitly allowing your code
to be distributed under the MIT license. You are also implicitly verifying that
all code is your original work. `</legalese>`

## License

- Copyright (c) 2017, Christopher Jeffrey (MIT License).

See LICENSE for more info.

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