ixfx
    Preparing search index...

    Function wildcard

    • Simple wilcard matching. Use '*' in pattern to denote any number of characters.

      // Must start with 'cat'
      wildcard(`cat*`,`caterpillar`); // true
      // Must end with 'cat'
      wildcat(`*cat`, `bobcat`); // true
      // 'cat' anywhere in string
      wildcard(`*cat*`, `see cat run`); // true

      Parameters

      • pattern: string

      Returns (value: string) => boolean