@yookue/ts-lang-utils
    Preparing search index...

    Function escapePattern

    • Returns a regex pattern that escaped the given pattern

      Parameters

      • Optionalpattern: null | string

        the pattern to inspect

      Returns undefined | null | string

      a regex pattern that escaped the given pattern

      David Hsing

      escapePattern('\\');    // '\\\\'
      escapePattern('-+='); // '\\-\\+='