We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 6f11e26 commit e1de8b1Copy full SHA for e1de8b1
src/Utils.ts
@@ -133,15 +133,14 @@ export class Utils {
133
pattern = pattern.substring(0, pattern.length - 1);
134
}
135
136
-
137
if (startsWithWildcard && endsWithWildcard)
138
return value.indexOf(pattern) !== -1;
139
140
if (startsWithWildcard)
141
- return value.lastIndexOf(pattern, 0) !== -1;
+ return value.lastIndexOf(pattern) === (value.length - pattern.length);
142
143
if (endsWithWildcard)
144
- return value.lastIndexOf(pattern) === (value.length - pattern.length);
+ return value.indexOf(pattern) === 0;
145
146
return value === pattern;
147
0 commit comments