@@ -54,8 +54,9 @@ export function bluetoothEnabled(target: Object, propertyKey: string, descriptor
5454// BT assigned-numbers: https://www.bluetooth.com/specifications/assigned-numbers/
5555const 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;
5656export 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 ;
5960}
6061
6162export function prepareArgs ( target : Object , propertyKey : string , descriptor : TypedPropertyDescriptor < any > ) {
@@ -70,7 +71,7 @@ export function prepareArgs(target: Object, propertyKey: string, descriptor: Typ
7071 const value = paramsToCheck [ k ] ;
7172 if ( value ) {
7273 if ( Array . isArray ( value ) ) {
73- paramsToCheck [ k ] = paramsToCheck [ k ] . map ( v => shortenUuidIfAssignedNumber ( v ) ) ;
74+ paramsToCheck [ k ] = paramsToCheck [ k ] . map ( ( v ) => shortenUuidIfAssignedNumber ( v ) ) ;
7475 } else {
7576 paramsToCheck [ k ] = shortenUuidIfAssignedNumber ( paramsToCheck [ k ] ?? '' ) ;
7677 }
@@ -532,7 +533,7 @@ export interface DiscoverCharacteristicsOptions extends DiscoverOptions {
532533}
533534
534535// tslint:disable-next-line:no-empty-interface
535- export interface StopNotifyingOptions extends CRUDOptions { }
536+ export interface StopNotifyingOptions extends CRUDOptions { }
536537
537538export interface StartNotifyingOptions extends CRUDOptions {
538539 onNotify : ( data : ReadResult ) => void ;
0 commit comments