lib/controller.js
function logAndFinish(tessel) {
      // The Tessels in `tessels` that we won't be using MUST
      // have their connections closed
      /* istanbul ignore else */
      if (tessel) {
        log.info(`Connected to ${tessel.displayName}.`);
        controller.closeTesselConnections(tessels.filter(closable => closable !== tessel))
          .then(() => resolve(tessel));
      } else {
        log.info('Please specify a Tessel by name [--name <tessel name>]');
        controller.closeTesselConnections(tessels)
          .then(() => reject('Multiple possible Tessel connections found.'));
      }
    }
function logAndFinish(tessel) {
      // The Tessels in `tessels` that we won't be using MUST
      // have their connections closed
      /* istanbul ignore else */
      if (tessel) {
        log.info(`Connected to ${tessel.displayName}.`);
        controller.closeTesselConnections(tessels.filter(closable => closable !== tessel))
          .then(() => resolve(tessel));
      } else {
        log.info('Please specify a Tessel by name [--name <tessel name>]');
        controller.closeTesselConnections(tessels)
          .then(() => reject('Multiple possible Tessel connections found.'));
      }
    }
function logAndFinish ( tessel ) { // The Tessels in `tessels` that we won't be using MUST // have their connections closed /* istanbul ignore else */ if ( tessel ) { log . info ( ` ${ tessel . displayName } ` ) ; controller . closeTesselConnections ( tessels . filter ( closable => closable !== tessel ) ) . then ( ( ) => resolve ( tessel ) ) ; } else { log . info ( 'Please specify a Tessel by name [--name <tessel name>]' ) ; controller . closeTesselConnections ( tessels ) . then ( ( ) => reject ( 'Multiple possible Tessel connections found.' ) ) ; } }
Accesses `tessels` in closure
Accesses tessels in closure