File tree Expand file tree Collapse file tree 1 file changed +1
-8
lines changed
Expand file tree Collapse file tree 1 file changed +1
-8
lines changed Original file line number Diff line number Diff line change @@ -15,16 +15,9 @@ program.parse();
1515
1616const argv = program . args ;
1717
18- const path = argv [ 0 ] ;
19-
2018const options = program . opts ( ) ;
2119
2220
23- if ( argv . length < 1 ) {
24- console . error ( "You must pass at least one path!" ) ;
25- process . exit ( 1 ) ;
26- }
27-
2821function counter ( item ) {
2922 const lines = item . trim ( ) . split ( "\n" ) . length ;
3023 const words = item . split ( / \s + / ) . filter ( Boolean ) . length ;
@@ -72,7 +65,7 @@ if (pathInfo.isFile()) {
7265 } else if ( options . character ) {
7366 console . log ( `${ stats . characters } ${ filePath } ` ) ;
7467 } else {
75- console . log ( `${ stats . lines } ${ stats . words } ${ stats . characters } ${ path } ` ) ;
68+ console . log ( `${ stats . lines } ${ stats . words } ${ stats . characters } ${ filePath } ` ) ;
7669 }
7770
7871 totalLines += stats . lines ;
You can’t perform that action at this time.
0 commit comments