index.js
function handler(req, next) {
  var conf = this.configure();
  var pkg = this.package();
  var copyright = conf.copyright || (pkg ? pkg.copyright : null);
  var opts = [this._version];
  var msg = this._name + ' %s';

  // NOTE: allows deferring to this handler from a custom handler
  if(arguments.length > 1 && typeof(next) !== 'function') {
    opts = opts.concat([].slice.call(arguments, 1));
  }
  opts.unshift(msg);
  // respect vanilla help setting
  if(conf.help.vanilla) {
    opts = [util.format.apply(util, opts)];
  }
  console.log.apply(console, opts);
  if(copyright) {
    console.log();
    copyright = '' + copyright;
    copyright = wrap(copyright, 0, conf.help.maximum);
    console.log(copyright);
  }
  if(conf.exit && req !== true) process.exit();
  return false;
}
function handler(req, next) {
  var conf = this.configure();
  var pkg = this.package();
  var copyright = conf.copyright || (pkg ? pkg.copyright : null);
  var opts = [this._version];
  var msg = this._name + ' %s';

  // NOTE: allows deferring to this handler from a custom handler
  if(arguments.length > 1 && typeof(next) !== 'function') {
    opts = opts.concat([].slice.call(arguments, 1));
  }
  opts.unshift(msg);
  // respect vanilla help setting
  if(conf.help.vanilla) {
    opts = [util.format.apply(util, opts)];
  }
  console.log.apply(console, opts);
  if(copyright) {
    console.log();
    copyright = '' + copyright;
    copyright = wrap(copyright, 0, conf.help.maximum);
    console.log(copyright);
  }
  if(conf.exit && req !== true) process.exit();
  return false;
}
function handler ( req , next ) { var conf = this . configure ( ) ; var pkg = this . package ( ) ; var copyright = conf . copyright || ( pkg ? pkg . copyright : null ) ; var opts = [ this . _version ] ; var msg = this . _name + ' %s' ; // NOTE: allows deferring to this handler from a custom handler if ( arguments . length > 1 && typeof ( next ) !== 'function' ) { opts = opts . concat ( [ ] . slice . call ( arguments , 1 ) ) ; } opts . unshift ( msg ) ; // respect vanilla help setting if ( conf . help . vanilla ) { opts = [ util . format . apply ( util , opts ) ] ; } console . log . apply ( console , opts ) ; if ( copyright ) { console . log ( ) ; copyright = '' + copyright ; copyright = wrap ( copyright , 0 , conf . help . maximum ) ; console . log ( copyright ) ; } if ( conf . exit && req !== true ) process . exit ( ) ; return false ; }
Default program version action.

@param alive Do not exit the process.
@param ... Message replacement parameters.
Default program version action .