1+ "use strict" ;
12var bluetoothleName = "BluetoothLePlugin" ;
23var bluetoothle = {
34 _newReorderer : function ( successCallback ) {
@@ -15,7 +16,7 @@ var bluetoothle = {
1516 */
1617 if ( sequence == null ) {
1718 this . callback ( obj ) ;
18- return ;
19+ return ;
1920 }
2021
2122 if ( sequence != this . nextExpected ) console . warn ( "Received out of order: expected " + this . nextExpected + " got " + sequence ) ;
@@ -49,7 +50,7 @@ var bluetoothle = {
4950 } ,
5051 getAdapterInfo : function ( successCallback ) {
5152 cordova . exec ( successCallback , successCallback , bluetoothleName , "getAdapterInfo" , [ ] ) ;
52- } ,
53+ } ,
5354 startScan : function ( successCallback , errorCallback , params ) {
5455 cordova . exec ( successCallback , errorCallback , bluetoothleName , "startScan" , [ params ] ) ;
5556 } ,
@@ -209,13 +210,13 @@ var bluetoothle = {
209210 return String . fromCharCode . apply ( null , new Uint16Array ( bytes ) ) ;
210211 } ,
211212 encodeUnicode : function ( str ) {
212- return btoa ( encodeURIComponent ( str ) . replace ( / % ( [ 0 - 9 A - F ] { 2 } ) / g, ( match , p1 ) => {
213+ return btoa ( encodeURIComponent ( str ) . replace ( / % ( [ 0 - 9 A - F ] { 2 } ) / g, function ( match , p1 ) {
213214 return String . fromCharCode ( parseInt ( p1 , 16 ) )
214215 } ) )
215216 } ,
216217 decodeUnicode : function ( str ) {
217218 // Going backwards: from byte stream, to percent-encoding, to original string.
218- return decodeURIComponent ( atob ( str ) . split ( '' ) . map ( ( c ) => {
219+ return decodeURIComponent ( atob ( str ) . split ( '' ) . map ( function ( c ) {
219220 return '%' + ( '00' + c . charCodeAt ( 0 ) . toString ( 16 ) ) . slice ( - 2 ) ;
220221 } ) . join ( '' ) ) ;
221222 } ,
0 commit comments