lufo-cli/src/lufo.js
function (action) {
  printHelpOnExit = false;
  const cliOptions = getOptions();
  if (cliOptions.host) {
    if (net.isIPv4(cliOptions.host)) {
      theUfo = new Ufo(cliOptions);
      theUfo.connect()
        .then(action.bind(theUfo))
        .catch(quitError);
    } else {
      quitError(`Invalid UFO IP address provided: ${cliOptions.host}.`);
    }
  } else {
    quitError('No UFO IP address provided.');
  }
}
function (action) {
  printHelpOnExit = false;
  const cliOptions = getOptions();
  if (cliOptions.host) {
    if (net.isIPv4(cliOptions.host)) {
      theUfo = new Ufo(cliOptions);
      theUfo.connect()
        .then(action.bind(theUfo))
        .catch(quitError);
    } else {
      quitError(`Invalid UFO IP address provided: ${cliOptions.host}.`);
    }
  } else {
    quitError('No UFO IP address provided.');
  }
}
function ( action ) { printHelpOnExit = false ; const cliOptions = getOptions ( ) ; if ( cliOptions . host ) { if ( net . isIPv4 ( cliOptions . host ) ) { theUfo = new Ufo ( cliOptions ) ; theUfo . connect ( ) . then ( action . bind ( theUfo ) ) . catch ( quitError ) ; } else { quitError ( ` ${ cliOptions . host } ` ) ; } } else { quitError ( 'No UFO IP address provided.' ) ; } }
Helper function for assembling the UFO object based on the given args. The UFO object created by this method is bound to "this" in the action callback.
Helper function for assembling the UFO object based on the given args . The UFO object created by this method is bound to this in the action callback .