webchalk-animate - v0.31.0
    Preparing search index...

    Type Alias TextEditOptions

    type TextEditOptions = {
        findAllMatches?: boolean;
        ignoreMatchCase?: boolean;
        joinMatches?: boolean;
        letterChunking?: "by-character" | "by-word";
        match?: string | RegExp;
        useCaptureGroups?: boolean;
    }
    Index

    Properties

    findAllMatches?: boolean

    If true, then match (if specified) will search for all matching results instead of just stopping at one.

    false
    
    ignoreMatchCase?: boolean

    If true, a case-insensitive search will be used if match is specified.

    false
    

    This applies when match is a RegExp as well. So do not attempt to specify the i flag when specifying a regular expression to match—it will be ignored.

    joinMatches?: boolean

    If true and findAllMatches is also true, then all matches will be treated as one large single match. This option is only meaningful when inserting an array.

    false
    
    letterChunking?: "by-character" | "by-word"

    An aesthetic option that determines whether text should be inserted/deleted by characters at a time or words at a time.

    'by-character'
    

    The default value is 'by-character' because that is typically less jarring for the eyes than whole words.

    match?: string | RegExp

    Retrieves the result of matching this string against a string or regular expression.

    • When inserting text, match (if specified) will be used to determine where to insert the new text.
    • If deleting or replacing text, match will be used to determine what text to delete (if unspecified, all text will be deleted or replaced).
    useCaptureGroups?: boolean

    If true, then if match contains capturing groups—portions enclosed in parentheses, as in /My ID is (\w\d)+, and my number is (\d+)/—each group will be inserted by, deleted, or replaced (whatever operation is being performed) instead of the entire match.

    false