@@ -1173,8 +1173,7 @@ const posix = {
1173
1173
}
1174
1174
1175
1175
resolvedPath = `${ path } /${ resolvedPath } ` ;
1176
- resolvedAbsolute =
1177
- StringPrototypeCharCodeAt ( path , 0 ) === CHAR_FORWARD_SLASH ;
1176
+ resolvedAbsolute = path [ 0 ] === '/' ;
1178
1177
}
1179
1178
1180
1179
// At this point the path should be resolved to a full absolute path, but
@@ -1200,10 +1199,8 @@ const posix = {
1200
1199
if ( path . length === 0 )
1201
1200
return '.' ;
1202
1201
1203
- const isAbsolute =
1204
- StringPrototypeCharCodeAt ( path , 0 ) === CHAR_FORWARD_SLASH ;
1205
- const trailingSeparator =
1206
- StringPrototypeCharCodeAt ( path , path . length - 1 ) === CHAR_FORWARD_SLASH ;
1202
+ const isAbsolute = path [ 0 ] === '/' ;
1203
+ const trailingSeparator = path [ path . length - 1 ] === '/' ;
1207
1204
1208
1205
// Normalize the path
1209
1206
path = normalizeString ( path , ! isAbsolute , '/' , isPosixPathSeparator ) ;
@@ -1543,8 +1540,8 @@ const posix = {
1543
1540
1544
1541
// Get non-dir info
1545
1542
for ( ; i >= start ; -- i ) {
1546
- const code = StringPrototypeCharCodeAt ( path , i ) ;
1547
- if ( code === CHAR_FORWARD_SLASH ) {
1543
+ const code = path [ i ] ;
1544
+ if ( code === '/' ) {
1548
1545
// If we reached a path separator that was not part of a set of path
1549
1546
// separators at the end of the string, stop now
1550
1547
if ( ! matchedSlash ) {
@@ -1559,7 +1556,7 @@ const posix = {
1559
1556
matchedSlash = false ;
1560
1557
end = i + 1 ;
1561
1558
}
1562
- if ( code === CHAR_DOT ) {
1559
+ if ( code === '.' ) {
1563
1560
// If this is our first dot, mark it as the start of our extension
1564
1561
if ( startDot === - 1 )
1565
1562
startDot = i ;
0 commit comments