File tree Expand file tree Collapse file tree 1 file changed +9
-3
lines changed
Expand file tree Collapse file tree 1 file changed +9
-3
lines changed Original file line number Diff line number Diff line change @@ -25,10 +25,13 @@ const {
2525 FunctionPrototypeBind,
2626 RegExp,
2727 StringPrototypeCharCodeAt,
28+ StringPrototypeIndexOf,
2829 StringPrototypeLastIndexOf,
30+ StringPrototypeReplace,
2931 StringPrototypeSlice,
3032 StringPrototypeToLowerCase,
3133} = primordials ;
34+
3235const {
3336 CHAR_UPPERCASE_A ,
3437 CHAR_LOWERCASE_A ,
@@ -1018,9 +1021,12 @@ const posix = {
10181021 const path = i >= 0 ?
10191022 args [ i ] :
10201023 ( ( ) => {
1021- const _ = process . cwd ( )
1022- . replace ( new RegExp ( `\\${ module . exports . sep } ` , 'g' ) , posix . sep ) ;
1023- return _ . substr ( _ . indexOf ( posix . sep ) ) ;
1024+ const _ = StringPrototypeReplace (
1025+ process . cwd ( ) ,
1026+ new RegExp ( `\\${ module . exports . sep } ` , 'g' ) ,
1027+ posix . sep
1028+ ) ;
1029+ return StringPrototypeSlice ( _ , StringPrototypeIndexOf ( _ , posix . sep ) ) ;
10241030 } ) ( ) ;
10251031
10261032
You can’t perform that action at this time.
0 commit comments