File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed
Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change 77const path = require ( "path" ) ;
88const NORMALIZE_SLASH_DIRECTION_REGEXP = / \\ / g;
99const PATH_CHARS_REGEXP = / [ - [ \] { } ( ) * + ? . , \\ ^ $ | # \s ] / g;
10- const SEPERATOR_REGEXP = / [ / \\ ] $ / ;
10+ const SEPARATOR_REGEXP = / [ / \\ ] $ / ;
1111const FRONT_OR_BACK_BANG_REGEXP = / ^ ! | ! $ / g;
1212const INDEX_JS_REGEXP = / \/ i n d e x .j s ( ! | \? | \( q u e r y \) ) / g;
1313
@@ -23,14 +23,14 @@ const createRegExpForPath = (path) => {
2323class RequestShortener {
2424 constructor ( directory ) {
2525 directory = normalizeBackSlashDirection ( directory ) ;
26- if ( SEPERATOR_REGEXP . test ( directory ) ) directory = directory . substr ( 0 , directory . length - 1 ) ;
26+ if ( SEPARATOR_REGEXP . test ( directory ) ) directory = directory . substr ( 0 , directory . length - 1 ) ;
2727
2828 if ( directory ) {
2929 this . currentDirectoryRegExp = createRegExpForPath ( directory ) ;
3030 }
3131
3232 const dirname = path . dirname ( directory ) ;
33- const endsWithSeperator = SEPERATOR_REGEXP . test ( dirname ) ;
33+ const endsWithSeperator = SEPARATOR_REGEXP . test ( dirname ) ;
3434 const parentDirectory = endsWithSeperator ? dirname . substr ( 0 , dirname . length - 1 ) : dirname ;
3535 if ( parentDirectory && parentDirectory !== directory ) {
3636 this . parentDirectoryRegExp = createRegExpForPath ( parentDirectory ) ;
You can’t perform that action at this time.
0 commit comments