• Checks if string matches the pattern. Either matches('foo', /foo/i) or matches('foo', 'foo', 'i'). If given value is not a string, then it returns false.

    Example

    expect(isMatch('xyz', /xyz/).value).toBeTruthy()
    

    Parameters

    • target: string

      The value being checked.

    • pattern: RegExp

      The match pattern

    • Optional modifiers: string

      The modifiers

    Returns Result<boolean | undefined>

Generated using TypeDoc