Options
All
  • Public
  • Public/Protected
  • All
Menu

External module "IsMatch"

Index

Functions

Functions

isMatch

  • isMatch(value: string, pattern: RegExp, modifiers?: string): boolean
  • 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.

    Parameters

    • value: string

      The value being checked.

    • pattern: RegExp

      The match pattern

    • Optional modifiers: string

      The modifiers

    Returns boolean

    True if string matches the pattern, false otherwise.

Generated using TypeDoc