@@ -26,7 +26,6 @@ var resolve = require( 'path' ).resolve;
2626var  readFileSync  =  require (  '@stdlib/fs-read-file'  ) . sync ; 
2727var  CLI  =  require (  '@stdlib/cli-ctor'  ) ; 
2828var  stdin  =  require (  '@stdlib/process-read-stdin'  ) ; 
29- var  Number  =  require (  '@stdlib/number-ctor'  ) ; 
3029var  stdinStream  =  require (  '@stdlib/streams-node-stdin'  ) ; 
3130var  reEOL  =  require (  '@stdlib/regexp-eol'  ) ; 
3231var  substringAfter  =  require (  './../lib'  ) ; 
@@ -74,8 +73,8 @@ function main() {
7473	if  (  ! stdinStream . isTTY  )  { 
7574		return  stdin (  onRead  ) ; 
7675	} 
77- 	if  (  flags . fromIndex  )  { 
78- 		console . log (  substringAfter (  str ,  flags . search ,  Number (  flags . fromIndex   )  )  ) ;  // eslint-disable-line no-console, max-len  
76+ 	if  (  flags [   'from-index'   ]  )  { 
77+ 		console . log (  substringAfter (  str ,  flags . search ,  parseInt (  flags [   'from-index'   ] ,   10   )  )  ) ;  // eslint-disable-line no-console 
7978	}  else  { 
8079		console . log (  substringAfter (  str ,  flags . search  )  ) ;  // eslint-disable-line no-console 
8180	} 
@@ -89,15 +88,17 @@ function main() {
8988	* @returns  {void } 
9089	*/ 
9190	function  onRead (  error ,  data  )  { 
91+ 		var  fromIndex ; 
9292		var  lines ; 
9393		var  i ; 
9494		if  (  error  )  { 
9595			return  cli . error (  error  ) ; 
9696		} 
9797		lines  =  data . toString ( ) . split (  reEOL . REGEXP  ) ; 
98- 		if  (  flags . fromIndex  )  { 
98+ 		if  (  flags [  'from-index'  ]  )  { 
99+ 			fromIndex  =  parseInt (  flags [  'from-index'  ] ,  10  ) ; 
99100			for  (  i  =  0 ;  i  <  lines . length ;  i ++  )  { 
100- 				console . log (  substringAfter (  lines [  i  ] ,  flags . search ,  Number (   flags . fromIndex   )  )  ) ;  // eslint-disable-line no-console, max-len 
101+ 				console . log (  substringAfter (  lines [  i  ] ,  flags . search ,  fromIndex  )  ) ;  // eslint-disable-line no-console, max-len 
101102			} 
102103		}  else  { 
103104			for  (  i  =  0 ;  i  <  lines . length ;  i ++  )  { 
0 commit comments