Closed roziscoding closed 3 months ago
How should the plugin handle the case of
hasCommand(/REGEX/i, { ignoreCase: false })
?
I think the RegExp should always take priority, not only because ignoreCase
is set to false
as a default, but more importantly, because is more likely for someone to set the i
flag when working with regex's and not care / notice about the ignoreCase
option, than to purposely add the i
flag and manually set ignoreCase
to true
In other words, if either i
or ignoreCase: true
is provided, casing will be ignored, and case-sensitive matching will only happen when none of the two options are set. Correct?
In other words, if either
i
orignoreCase: true
is provided, casing will be ignored, and case-sensitive matching will only happen when none of the two options are set. Correct?
Exactly
Fixes #27