-
Notifications
You must be signed in to change notification settings - Fork 21
Open
Labels
Description
Currently the API is parse(string), meaning parse accepts a single string representing a regular expression.
It should be possible to specify which flags apply to the regular expression, since they might influence parsing (as is the case for the ES6 /u flag). Any ideas on the best way to extend the API, moving forward? parse(string, flags) where flags is an object such as { g: true, i: false, m: false, u: true }?
Or would we at some point need to pass more than just flags to parse, e.g. options? In that case we’d be better off using parse(string, options) where options.flags represents the flags.