FileHound
    Preparing search index...

    Function discard

    • Excludes files whose path satisfies any of the given regular expression patterns

      Parameters

      • ...patterns: string[]

        one or more regular expression patterns

      Returns FilePredicate

      the predicate

      Used with FileHound.match, a discarded directory is left out of the results but still searched. To keep the search out of it, pass its name to FileHound.skipDirectories instead.

      FileHound.create().match(discard('node_modules', '\\.git'));