(str: string): string import {escape_regexp} from '@fuzdev/fuz_util/regexp.js'; Escapes a string for literal matching in a RegExp.
str
type
stringreturns
string 2 declarations
(str: string): string import {escape_regexp} from '@fuzdev/fuz_util/regexp.js'; Escapes a string for literal matching in a RegExp.
strstringstring <T extends RegExp>(regexp: T): T import {reset_regexp} from '@fuzdev/fuz_util/regexp.js'; Reset a RegExp's lastIndex to 0 for global and sticky patterns. Ensures consistent behavior by clearing state that affects subsequent matches.
regexpTT reset_regexp<T extends RegExp>TRegExpregexp — sets lastIndex to 0 if regexp is global or sticky