lib/usb/deviceloader.js
function UsbDeviceLoader(Device, vendorId, productId) {

  // call super class
  DeviceLoader.call(this);

  this.Device = Device;

  this.vidPidPairs = [];

  if (!productId && _.isArray(vendorId)) {
    this.vidPidPairs = vendorId;
  } else {
    this.vidPidPairs = [{vendorId: vendorId, productId: productId}];
  }
}
function UsbDeviceLoader(Device, vendorId, productId) {

  // call super class
  DeviceLoader.call(this);

  this.Device = Device;

  this.vidPidPairs = [];

  if (!productId && _.isArray(vendorId)) {
    this.vidPidPairs = vendorId;
  } else {
    this.vidPidPairs = [{vendorId: vendorId, productId: productId}];
  }
}
function UsbDeviceLoader ( Device , vendorId , productId ) { // call super class DeviceLoader . call ( this ) ; this . Device = Device ; this . vidPidPairs = [ ] ; if ( ! productId && _ . isArray ( vendorId ) ) { this . vidPidPairs = vendorId ; } else { this . vidPidPairs = [ { vendorId : vendorId , productId : productId } ] ; } }
A usbdeviceloader can check if there are available some serial devices.
@param {Object}          Device    Device The constructor function of the device.
@param {Number || Array} vendorId  The vendor id or an array of vid/pid pairs.
@param {Number}          productId The product id or optional.
A usbdeviceloader can check if there are available some serial devices .