Open stark-chase opened 3 years ago
Dear @stark-chase, sorry for my late reply. To be honest I did not find time for you issue sooner. I created another option named findRegExpFlags where you can pass the RegExp flags. I have chosen this solution because I did not find a method how to check by JSON schema that a particular atomic value is a RegExp object. I suppose that RegExp is not a JSON serializable value so the JSON schema also does not allow to check this JS type and I do not want to leave the loader settings unchecked.
I do not quite understand what you mean by "multiple switches" on the same pattern. Could you please explain it more? If this project does help you I have no problem to extend it to your needs.
I did not commit it yet to NPM before resolving other issues in the repo so you can download for now just the hotfix I made. Please, let mi know if the fix does work for you. Thank you very much.
Hey!
Currently, there is no way to have multiple switches on the same pattern. using the regex option doesn't resolve it because there is no option to add the global flag to the created regex (here). Could you maybe add an option to add flags to the regex or even better - allow the pattern to be also regex (here).
I can even do it myself if you want to
Thanks :)