Socket
Socket
Sign inDemoInstall

usb

Package Overview
Dependencies
Maintainers
3
Versions
96
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

usb - npm Package Compare versions

Comparing version 2.1.1 to 2.1.2

5

CHANGELOG.md
# Changelog
## [2.1.2] - 2022-02-09
### Fixed
- Fixed error being thrown when searching for interface endpoint - [`479`](https://github.com/node-usb/node-usb/pull/479) ([Rob Moran](https://github.com/thegecko))
## [2.1.1] - 2022-02-07

@@ -4,0 +9,0 @@

2

dist/usb/interface.d.ts

@@ -77,3 +77,3 @@ import { LibUSBException, Device } from './bindings';

*/
endpoint(addr: number): Endpoint;
endpoint(addr: number): Endpoint | undefined;
}

@@ -128,7 +128,3 @@ "use strict";

Interface.prototype.endpoint = function (addr) {
var endpoint = this.endpoints.find(function (item) { return item.address === addr; });
if (!endpoint) {
throw new Error("Endpoint not found for address: " + addr);
}
return endpoint;
return this.endpoints.find(function (item) { return item.address === addr; });
};

@@ -135,0 +131,0 @@ return Interface;

@@ -5,3 +5,3 @@ {

"license": "MIT",
"version": "2.1.1",
"version": "2.1.2",
"main": "dist/index.js",

@@ -8,0 +8,0 @@ "engines": {

@@ -164,10 +164,5 @@ import { LibUSBException, LIBUSB_ENDPOINT_IN, Device } from './bindings';

*/
public endpoint(addr: number): Endpoint {
const endpoint = this.endpoints.find(item => item.address === addr);
if (!endpoint) {
throw new Error(`Endpoint not found for address: ${addr}`);
}
return endpoint;
public endpoint(addr: number): Endpoint | undefined {
return this.endpoints.find(item => item.address === addr);
}
}

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc