@@ -6,11 +6,10 @@ const merge = (
66 // Returns: array
77) => {
88 const array = args [ 0 ] ;
9- let i , ilen , j , jlen , arr , val ;
10- for ( i = 1 , ilen = args . length ; i < ilen ; i ++ ) {
11- arr = args [ i ] ;
12- for ( j = 0 , jlen = arr . length ; j < jlen ; j ++ ) {
13- val = arr [ j ] ;
9+ for ( let i = 1 ; i < args . length ; i ++ ) {
10+ const arr = args [ i ] ;
11+ for ( let j = 0 ; j < arr . length ; j ++ ) {
12+ const val = arr [ j ] ;
1413 if ( ! array . includes ( val ) ) array . push ( val ) ;
1514 }
1615 }
@@ -108,18 +107,16 @@ const introspect = (
108107 // Returns: hash of hash of record, { method, title, parameters }
109108) => {
110109 const inventory = { } ;
111- let name , iface , methods , method , fn , signature ;
112- for ( name in namespace ) {
113- iface = namespace [ name ] ;
114- methods = { } ;
110+ for ( const name in namespace ) {
111+ const iface = namespace [ name ] ;
112+ const methods = { } ;
115113 inventory [ name ] = methods ;
116- for ( method in iface ) {
117- fn = iface [ method ] ;
118- signature = parseSignature ( fn ) ;
119- signature = Object . assign ( {
114+ for ( const method in iface ) {
115+ const fn = iface [ method ] ;
116+ const signature = parseSignature ( fn ) ;
117+ methods [ method ] = Object . assign ( {
120118 method : name + '.' + method
121119 } , signature ) ;
122- methods [ method ] = signature ;
123120 }
124121 }
125122 return inventory ;
@@ -131,14 +128,13 @@ const badIntrospect = (
131128 // Returns: hash of hash of record, { method, title, parameters }
132129) => {
133130 const inventory = { } ;
134- let name , iface , methods , method , fn , signature ;
135- for ( name in namespace ) {
136- iface = namespace [ name ] ;
137- methods = { } ;
131+ for ( const name in namespace ) {
132+ const iface = namespace [ name ] ;
133+ const methods = { } ;
138134 inventory [ name ] = methods ;
139- for ( method in iface ) {
140- fn = iface [ method ] ;
141- signature = {
135+ for ( const method in iface ) {
136+ const fn = iface [ method ] ;
137+ const signature = {
142138 title : '' , description : '' ,
143139 parameters : [ ] , comments : [ ]
144140 } ;
@@ -182,10 +178,9 @@ const badIntrospect = (
182178 }
183179 }
184180 }
185- signature = Object . assign ( {
181+ methods [ method ] = Object . assign ( {
186182 method : name + '.' + method
187183 } , signature ) ;
188- methods [ method ] = signature ;
189184 }
190185 }
191186 return inventory ;
0 commit comments