lib/index.js
function main(program) {
  program || (program = { args: [] });
  if(program.args.length === 0) {
    program.outputHelp();
    return process.exit(1);
  }

  return Promise
    .map(program.args, _.partial(exports.downloadPosting, program))
    .map(function(html) {
      return cheerio.load(html);
    })
    .map(exports.extractInfo)
    .then(_.partial(exports.outputInfo, program));
}
function main(program) {
  program || (program = { args: [] });
  if(program.args.length === 0) {
    program.outputHelp();
    return process.exit(1);
  }

  return Promise
    .map(program.args, _.partial(exports.downloadPosting, program))
    .map(function(html) {
      return cheerio.load(html);
    })
    .map(exports.extractInfo)
    .then(_.partial(exports.outputInfo, program));
}
function main ( program ) { program || ( program = { args : [ ] } ) ; if ( program . args . length === 0 ) { program . outputHelp ( ) ; return process . exit ( 1 ) ; } return Promise . map ( program . args , _ . partial ( exports . downloadPosting , program ) ) . map ( function ( html ) { return cheerio . load ( html ) ; } ) . map ( exports . extractInfo ) . then ( _ . partial ( exports . outputInfo , program ) ) ; }
Takes a `program` instance from the `commander` module and executes the `cli`
functionality.

@param {Object} program A `program` object from `commander`
@return {Promise} A promise to the execution's result
Takes a program instance from the commander module and executes the cli functionality .