src/options.js
function setDefault (opts, key, val) {
  if (opts.schema) {
    opts.prompts = opts.schema;
    delete opts.schema;
  }
  const prompts = opts.prompts || (opts.prompts = {});
  if (!prompts[key] || typeof prompts[key] !== 'object') {
    prompts[key] = {
      'type': 'string',
      'default': val
    };
  }
  else {
    prompts[key]['default'] = val;
  }
}
function setDefault (opts, key, val) {
  if (opts.schema) {
    opts.prompts = opts.schema;
    delete opts.schema;
  }
  const prompts = opts.prompts || (opts.prompts = {});
  if (!prompts[key] || typeof prompts[key] !== 'object') {
    prompts[key] = {
      'type': 'string',
      'default': val
    };
  }
  else {
    prompts[key]['default'] = val;
  }
}
function setDefault ( opts , key , val ) { if ( opts . schema ) { opts . prompts = opts . schema ; delete opts . schema ; } const prompts = opts . prompts || ( opts . prompts = { } ) ; if ( ! prompts [ key ] || typeof prompts [ key ] !== 'object' ) { prompts [ key ] = { 'type' : 'string' , 'default' : val } ; } else { prompts [ key ] [ 'default' ] = val ; } }
Set the default value for a prompt question

@param {Object} opts
@param {String} key
@param {String} val
Set the default value for a prompt question