mirror of
https://github.com/microsoft/TypeScript.git
synced 2025-11-18 17:21:48 +00:00
Nit: use slice instead of substr.
This commit is contained in:
@@ -9395,11 +9395,11 @@ export function getSubPatternFromSpec(
|
||||
// like so: **/.*/.*
|
||||
if (component.charCodeAt(0) === CharacterCodes.asterisk) {
|
||||
componentPattern += "(?:[^./]" + singleAsteriskRegexFragment + ")?";
|
||||
component = component.substr(1);
|
||||
component = component.slice(1);
|
||||
}
|
||||
else if (component.charCodeAt(0) === CharacterCodes.question) {
|
||||
componentPattern += "[^./]";
|
||||
component = component.substr(1);
|
||||
component = component.slice(1);
|
||||
}
|
||||
|
||||
componentPattern += component.replace(reservedCharacterPattern, replaceWildcardCharacter);
|
||||
|
||||
Reference in New Issue
Block a user