File tree Expand file tree Collapse file tree 2 files changed +3
-3
lines changed
Expand file tree Collapse file tree 2 files changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -5,7 +5,7 @@ function join(arg, extra = null) {
55 const name = components [ i ] ;
66 const normalized_name = name . replace ( / \/ + / g, '/' ) . replace ( / ^ \/ | \/ $ / g, '' ) ;
77 names . push ( normalized_name ) ;
8- if ( name [ 0 ] == '/' ) {
8+ if ( name [ 0 ] === '/' ) {
99 names . push ( '' ) ;
1010 break ;
1111 }
@@ -16,7 +16,7 @@ function join(arg, extra = null) {
1616function dirname ( arg ) {
1717 const path = join ( [ arg ] ) ;
1818 const index = path . lastIndexOf ( '/' ) ;
19- return index == - 1 ? '.' : path . substr ( 0 , index ) || '/' ;
19+ return index === - 1 ? '.' : ( path . substr ( 0 , index ) || '/' ) ;
2020}
2121
2222export default {
Original file line number Diff line number Diff line change @@ -27,6 +27,6 @@ test('join/1', (t) => {
2727} ) ;
2828
2929test ( 'join/2' , ( t ) => {
30- let result = Core . filename . join ( '/usr' , 'bin' ) ;
30+ const result = Core . filename . join ( '/usr' , 'bin' ) ;
3131 t . is ( result , '/usr/bin' ) ;
3232} ) ;
You can’t perform that action at this time.
0 commit comments