Socket
Socket
Sign inDemoInstall

webbluetooth

Package Overview
Dependencies
Maintainers
1
Versions
58
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

webbluetooth - npm Package Compare versions

Comparing version 1.0.5 to 1.0.6

12

lib/helpers.js

@@ -275,4 +275,6 @@ "use strict";

function getServiceUUID(service) {
if (bluetoothServices[service])
// Check for string as enums also allow a reverse lookup which will match any numbers passed in
if (typeof service === "string" && bluetoothServices[service]) {
service = bluetoothServices[service];
}
return getCanonicalUUID(service);

@@ -287,4 +289,6 @@ }

function getCharacteristicUUID(characteristic) {
if (bluetoothCharacteristics[characteristic])
// Check for string as enums also allow a reverse lookup which will match any numbers passed in
if (typeof characteristic === "string" && bluetoothCharacteristics[characteristic]) {
characteristic = bluetoothCharacteristics[characteristic];
}
return getCanonicalUUID(characteristic);

@@ -299,4 +303,6 @@ }

function getDescriptorUUID(descriptor) {
if (bluetoothDescriptors[descriptor])
// Check for string as enums also allow a reverse lookup which will match any numbers passed in
if (typeof descriptor === "string" && bluetoothDescriptors[descriptor]) {
descriptor = bluetoothDescriptors[descriptor];
}
return getCanonicalUUID(descriptor);

@@ -303,0 +309,0 @@ }

{
"name": "webbluetooth",
"version": "1.0.5",
"version": "1.0.6",
"description": "Node.js implementation of the Web Bluetooth Specification",

@@ -5,0 +5,0 @@ "homepage": "https://github.com/thegecko/webbluetooth",

@@ -271,3 +271,7 @@ /*

export function getServiceUUID(service: string | number): string {
if (bluetoothServices[service]) service = bluetoothServices[service];
// Check for string as enums also allow a reverse lookup which will match any numbers passed in
if (typeof service === "string" && bluetoothServices[service]) {
service = bluetoothServices[service];
}
return getCanonicalUUID(service);

@@ -282,3 +286,7 @@ }

export function getCharacteristicUUID(characteristic: string | number): string {
if (bluetoothCharacteristics[characteristic]) characteristic = bluetoothCharacteristics[characteristic];
// Check for string as enums also allow a reverse lookup which will match any numbers passed in
if (typeof characteristic === "string" && bluetoothCharacteristics[characteristic]) {
characteristic = bluetoothCharacteristics[characteristic];
}
return getCanonicalUUID(characteristic);

@@ -293,4 +301,8 @@ }

export function getDescriptorUUID(descriptor: string | number): string {
if (bluetoothDescriptors[descriptor]) descriptor = bluetoothDescriptors[descriptor];
// Check for string as enums also allow a reverse lookup which will match any numbers passed in
if (typeof descriptor === "string" && bluetoothDescriptors[descriptor]) {
descriptor = bluetoothDescriptors[descriptor];
}
return getCanonicalUUID(descriptor);
}

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