Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
openHandlers.push(id => {
if (id.startsWith("usb|")) {
const json = JSON.parse(id.slice(4));
// $FlowFixMe: we should have concept of id in HIDTransport
return HIDTransport.open(json);
}
return null;
});
observables.push(hidObservable);
return retry(() => HIDTransport.open(devicePath), { maxRetry: 2 });
}