import { isNullOrUndefined } from 'util' ; import { Device } from 'node-hid' ; import { USB } from '../../models' ; export const deviceFinder = ( usb ) => { return ( device ) : boolean => { if ( device . productId !== usb . productId ) { return false ; } if ( device . vendorId !== usb . vendorId ) { return false ; } return true ; } ; } ;