@@ -54,8 +54,9 @@ export function bluetoothEnabled(target: Object, propertyKey: string, descriptor
54
54
// BT assigned-numbers: https://www.bluetooth.com/specifications/assigned-numbers/
55
55
const patternBtAssignedNumbers = / 0 0 0 0 ( .{ 4 } ) - 0 0 0 0 - 1 0 0 0 - 8 0 0 0 - 0 0 8 0 5 f 9 b 3 4 f b / i;
56
56
export function shortenUuidIfAssignedNumber ( uuid : string ) {
57
- const matcher = uuid . toLowerCase ( ) . match ( patternBtAssignedNumbers ) ;
58
- return ( matcher && matcher . length > 0 ? matcher [ 1 ] : uuid ) ;
57
+ const lUUID = uuid . toLowerCase ( ) ;
58
+ const matcher = lUUID . match ( patternBtAssignedNumbers ) ;
59
+ return matcher && matcher . length > 0 ? matcher [ 1 ] : lUUID ;
59
60
}
60
61
61
62
export function prepareArgs ( target : Object , propertyKey : string , descriptor : TypedPropertyDescriptor < any > ) {
@@ -70,7 +71,7 @@ export function prepareArgs(target: Object, propertyKey: string, descriptor: Typ
70
71
const value = paramsToCheck [ k ] ;
71
72
if ( value ) {
72
73
if ( Array . isArray ( value ) ) {
73
- paramsToCheck [ k ] = paramsToCheck [ k ] . map ( v => shortenUuidIfAssignedNumber ( v ) ) ;
74
+ paramsToCheck [ k ] = paramsToCheck [ k ] . map ( ( v ) => shortenUuidIfAssignedNumber ( v ) ) ;
74
75
} else {
75
76
paramsToCheck [ k ] = shortenUuidIfAssignedNumber ( paramsToCheck [ k ] ?? '' ) ;
76
77
}
@@ -532,7 +533,7 @@ export interface DiscoverCharacteristicsOptions extends DiscoverOptions {
532
533
}
533
534
534
535
// tslint:disable-next-line:no-empty-interface
535
- export interface StopNotifyingOptions extends CRUDOptions { }
536
+ export interface StopNotifyingOptions extends CRUDOptions { }
536
537
537
538
export interface StartNotifyingOptions extends CRUDOptions {
538
539
onNotify : ( data : ReadResult ) => void ;
0 commit comments