Skip to content

Commit c0b379d

Browse files
committed
case-insensitive prefix/suffix regexes
1 parent d5177b5 commit c0b379d

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/utils.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -97,9 +97,9 @@ export const escapeRegExp = (text: string): string => text.replace(/[.*+?^${}()|
9797

9898
export const getRegExp = (value: string): RegExp => new RegExp(escapeRegExp(value));
9999

100-
export const getPrefixRegExp = (value: string): RegExp => new RegExp('^' + escapeRegExp(value));
100+
export const getPrefixRegExp = (value: string): RegExp => new RegExp('^' + escapeRegExp(value), 'i');
101101

102-
export const getSuffixRegExp = (value: string): RegExp => new RegExp(escapeRegExp(value) + '$');
102+
export const getSuffixRegExp = (value: string): RegExp => new RegExp(escapeRegExp(value) + '$', 'i');
103103

104104
export const getBoolValue = (input: string): boolean => !['false', '0', '', 'no', 'n'].includes(input.trim().toLowerCase());
105105

0 commit comments

Comments
 (0)