@alwaysblank/denden
    Preparing search index...

    Function match

    • Test if needle can be matched against haystack.

      If needle is a regular expression, then JavaScript's RegExp test() is used. Note that this is only used if needle is a RegExp object, not if it is a string that looks like a regular expression—a string will be matched with the string rules.

      If needle is a string, it is matched against haystack using the following tests:

      • * always matches.
      • word* will needle strings that begin with word, i.e. wording.
      • *word will needle strings that end with word, i.e. unword.
      • *or* will needle nothing; use a regular expression instead.
      • Strings without a *, or that don't begin or end with * will be matched only if they are strictly equal to haystack.

      Parameters

      Returns boolean