# promfig

> Completes a given config by prompting the user for the missing properties.

Latest version **0.1.2** (published 2013-09-04) · MIT license · 0 weekly downloads

## Install

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

## 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.1.2 |
| Published | 2013-09-04 |
| First published | 2013-07-01 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 4 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 4 |
| Author | Thorsten Lorenz |
| Maintainers | thlorenz |
| Keywords | prompt, config, complete, fill in, missing, readline, interface |

## Links

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

## Dependencies (4)

- [pw](https://npm.io/package/pw.md) 0.0.4
- [xtend](https://npm.io/package/xtend.md) ~2.1.1
- [runnel](https://npm.io/package/runnel.md) ~0.5.1
- [promptly](https://npm.io/package/promptly.md) ~0.2.0

## Alternatives

- [localforage](https://npm.io/package/localforage.md) — 6.2M weekly downloads
- [localforage-observable](https://npm.io/package/localforage-observable.md) — 30.8K weekly downloads
- [@y/y](https://npm.io/package/@y/y.md) — 30.1K weekly downloads
- [@metaobjectsdev/render](https://npm.io/package/@metaobjectsdev/render.md) — 3.5K weekly downloads
- [@ledgerhq/coin-algorand](https://npm.io/package/@ledgerhq/coin-algorand.md) — 1.1K weekly downloads

## Recent versions

- 0.1.2 (latest) — 2013-09-04
- 0.1.1 — 2013-07-13
- 0.1.0 — 2013-07-01

## README

# promfig [![build status](https://secure.travis-ci.org/thlorenz/promfig.png)](http://travis-ci.org/thlorenz/promfig)

Completes a given config by prompting the user for the missing properties.

```js
var promfig = require('promfig')
var properties = { 
    user      :  'Please enter your username :  '
  , password  :  'Please enter your password :  '
  , '@secret' :  'password'
  };
var config = { user: 'humptydumpty' };

promfig(
    properties
  , config 
  , function (err, config) {
      if (err) return console.error('err: ', err);
      console.log(config);
  }
);
```

```
➝  node username-password-one-given.js
Please enter your password :  ******
{ user: 'humptydumpty', password: 'humpty' }
```

[more examples](https://github.com/thlorenz/promfig/tree/master/examples)

## Installation

    npm install promfig

## API

###*promfig(properties : Object, config : Object, callback : Function)*

Will complete the given `config` with by prompting user for missing `properties`.

#### properties

- key/values where the value is the text with which to prompt the user for the property
- `@secret`: special key which takes a `string` or `[ string ]` to configure properties that should be masked while the
  user inputs them

## License

MIT

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