File tree Expand file tree Collapse file tree 1 file changed +1
-14
lines changed Expand file tree Collapse file tree 1 file changed +1
-14
lines changed Original file line number Diff line number Diff line change @@ -51,20 +51,7 @@ const errors = require('internal/errors');
51
51
// This function is used in the case of small paths, where manual character code
52
52
// checks can greatly outperform the equivalent regexp (tested in V8 5.4).
53
53
function isInvalidPath ( s ) {
54
- var i = 0 ;
55
- if ( s . charCodeAt ( 0 ) <= 32 ) return true ;
56
- if ( ++ i >= s . length ) return false ;
57
- if ( s . charCodeAt ( 1 ) <= 32 ) return true ;
58
- if ( ++ i >= s . length ) return false ;
59
- if ( s . charCodeAt ( 2 ) <= 32 ) return true ;
60
- if ( ++ i >= s . length ) return false ;
61
- if ( s . charCodeAt ( 3 ) <= 32 ) return true ;
62
- if ( ++ i >= s . length ) return false ;
63
- if ( s . charCodeAt ( 4 ) <= 32 ) return true ;
64
- if ( ++ i >= s . length ) return false ;
65
- if ( s . charCodeAt ( 5 ) <= 32 ) return true ;
66
- ++ i ;
67
- for ( ; i < s . length ; ++ i )
54
+ for ( var i = 0 ; i < s . length ; ++ i )
68
55
if ( s . charCodeAt ( i ) <= 32 ) return true ;
69
56
return false ;
70
57
}
You can’t perform that action at this time.
0 commit comments