import { devices } from 'node-hid' ; import { isBootloader , isUhkZeroInterface } from '../util' ; export function getNumberOfConnectedDevices ( ) { return devices ( ) . filter ( dev => isUhkZeroInterface ( dev ) || isBootloader ( dev ) ) . length ; }