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');
5151// This function is used in the case of small paths, where manual character code
5252// checks can greatly outperform the equivalent regexp (tested in V8 5.4).
5353function 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 )
6855 if ( s . charCodeAt ( i ) <= 32 ) return true ;
6956 return false ;
7057}
You can’t perform that action at this time.
0 commit comments