@@ -36,9 +36,9 @@ const ALL_TYPES = merge(SCALAR_TYPES, OBJECT_TYPES, META_TYPES);
3636const FUNC_TERMS = [ ') {' , ') => {' , ') => (' ] ;
3737const NAMED_LINES = [ 'Example:' , 'Returns:' , 'Hint:' , 'Result:' ] ;
3838
39- const indexing = s => term => s . indexOf ( term ) ;
39+ const indexing = ( s ) => ( term ) => s . indexOf ( term ) ;
4040
41- const last = arr => arr [ arr . length - 1 ] ;
41+ const last = ( arr ) => arr [ arr . length - 1 ] ;
4242
4343const parseLines = (
4444 // Parse signature lines
@@ -50,12 +50,12 @@ const parseLines = (
5050 lines . pop ( ) ;
5151 signature . title = ( lines . shift ( ) || '' ) . replace ( '//' , '' ) . trim ( ) ;
5252 lines = lines . map (
53- d => d . trim ( ) . replace ( / ^ ( .* ) \/ \/ / , '$1:' ) . replace ( ',:' , ':' )
53+ ( d ) => d . trim ( ) . replace ( / ^ ( .* ) \/ \/ / , '$1:' ) . replace ( ',:' , ':' )
5454 ) ;
5555 for ( let line of lines ) {
5656 if ( line . startsWith ( '//' ) ) {
5757 line = line . replace ( / ^ \/ \/ / , '' ) . trim ( ) ;
58- if ( NAMED_LINES . find ( s => line . startsWith ( s ) ) ) {
58+ if ( NAMED_LINES . find ( ( s ) => line . startsWith ( s ) ) ) {
5959 const [ name , comment ] = section ( line , ': ' ) ;
6060 signature . comments . push ( { name, comment } ) ;
6161 } else if ( signature . parameters . length === 0 ) {
@@ -70,7 +70,7 @@ const parseLines = (
7070 } else {
7171 const [ name , text ] = section ( line , ': ' ) ;
7272 let [ type , comment ] = section ( text , ', ' ) ;
73- if ( ! ALL_TYPES . find ( s => type . startsWith ( s ) ) ) {
73+ if ( ! ALL_TYPES . find ( ( s ) => type . startsWith ( s ) ) ) {
7474 comment = type ;
7575 type = '' ;
7676 }
@@ -90,7 +90,7 @@ const parseSignature = (
9090 } ;
9191 let s = fn . toString ( ) ;
9292 let pos = FUNC_TERMS . map ( indexing ( s ) )
93- . filter ( k => k !== - 1 )
93+ . filter ( ( k ) => k !== - 1 )
9494 . reduce ( ( prev , cur ) => ( prev < cur ? prev : cur ) , s . length ) ;
9595 if ( pos !== - 1 ) {
9696 s = s . substring ( 0 , pos ) ;
@@ -140,7 +140,7 @@ const badIntrospect = (
140140 } ;
141141 let s = fn . toString ( ) ;
142142 let pos = FUNC_TERMS . map ( indexing ( s ) )
143- . filter ( k => k !== - 1 )
143+ . filter ( ( k ) => k !== - 1 )
144144 . reduce ( ( prev , cur ) => ( prev < cur ? prev : cur ) , s . length ) ;
145145 if ( pos !== - 1 ) {
146146 s = s . substring ( 0 , pos ) ;
@@ -150,12 +150,12 @@ const badIntrospect = (
150150 lines . pop ( ) ;
151151 signature . title = ( lines . shift ( ) || '' ) . replace ( '//' , '' ) . trim ( ) ;
152152 lines = lines . map (
153- d => d . trim ( ) . replace ( / ^ ( .* ) \/ \/ / , '$1:' ) . replace ( ',:' , ':' )
153+ ( d ) => d . trim ( ) . replace ( / ^ ( .* ) \/ \/ / , '$1:' ) . replace ( ',:' , ':' )
154154 ) ;
155155 for ( let line of lines ) {
156156 if ( line . startsWith ( '//' ) ) {
157157 line = line . replace ( / ^ \/ \/ / , '' ) . trim ( ) ;
158- if ( NAMED_LINES . find ( s => line . startsWith ( s ) ) ) {
158+ if ( NAMED_LINES . find ( ( s ) => line . startsWith ( s ) ) ) {
159159 const [ name , comment ] = section ( line , ': ' ) ;
160160 signature . comments . push ( { name, comment } ) ;
161161 } else if ( signature . parameters . length === 0 ) {
@@ -170,7 +170,7 @@ const badIntrospect = (
170170 } else {
171171 const [ name , text ] = section ( line , ': ' ) ;
172172 let [ type , comment ] = section ( text , ', ' ) ;
173- if ( ! ALL_TYPES . find ( s => type . startsWith ( s ) ) ) {
173+ if ( ! ALL_TYPES . find ( ( s ) => type . startsWith ( s ) ) ) {
174174 comment = type ;
175175 type = '' ;
176176 }
0 commit comments