Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Completes a given config by prompting the user for the missing properties.
JavaScript
branch: master

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
examples
test
.gitignore
.travis.yml
LICENSE
README.md
index.js
package.json

README.md

promfig build status

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

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

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

Something went wrong with that request. Please try again.