Function exactly

  • Match the given string literally, escaping all special characters.

    Parameters

    • literal: string

    Returns RegExpToken

    Example

    exactly`match`
    

    RegExp equivalent:

    /match/
    

    Example

    exactly`(yes/no)`
    

    RegExp equivalent:

    /\(yes/no\)/
    
  • Match the given string literally, escaping all special characters.

    Parameters

    • template: TemplateStringsArray
    • Rest ...args: unknown[]

    Returns RegExpToken

    Example

    exactly`match`
    

    RegExp equivalent:

    /match/
    

    Example

    exactly`(yes/no)`
    

    RegExp equivalent:

    /\(yes/no\)/
    

Generated using TypeDoc