Members
(constant) isRegexpEmpty
Returns true if the provided RegExp is empty
(constant) isRegexpNotEmpty
Returns true if the provided RegExp is not empty
(constant) makeRegexOf
Creates a regular expression using the flags provided
Example
> const regex = makeRegexOf('giu')('foo+bar')
/foo+bar/giu
(constant) makeSafeRegexOf
Creates an escaped regular expression using the flags provided to prevent regexp injections from source strings
Example
> regex = makeSafeRegexOf('giu')('foo+bar')
/foo\+bar/giu
(constant) regexOf
Return a regular expression based on the given string
Example
> regexOf('foo')
/foo/giu
(constant) safeRegexOf
Return a safe regular expression based on the given string
Example
> safeRegexOf('foo+bar')
/foo\+bar/giu