Global

Members

(constant) isRegexpEmpty

Source:

Returns true if the provided RegExp is empty

(constant) isRegexpNotEmpty

Source:

Returns true if the provided RegExp is not empty

(constant) makeRegexOf

Source:

Creates a regular expression using the flags provided

Example
> const regex = makeRegexOf('giu')('foo+bar')
/foo+bar/giu

(constant) makeSafeRegexOf

Source:

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

Source:

Return a regular expression based on the given string

Example
> regexOf('foo')
/foo/giu

(constant) safeRegexOf

Source:

Return a safe regular expression based on the given string

Example
> safeRegexOf('foo+bar')
/foo\+bar/giu