@types/minimatch

  • Version 3.0.4
  • Published
  • 7.97 kB
  • No dependencies
  • MIT license

Install

npm i @types/minimatch
yarn add @types/minimatch
pnpm add @types/minimatch

Overview

TypeScript definitions for Minimatch

Index

Variables

variable Minimatch

let Minimatch: IMinimatchStatic;

    Functions

    function filter

    filter: (
    pattern: string,
    options?: IOptions
    ) => (element: string, indexed: number, array: ReadonlyArray<string>) => boolean;
    • Returns a function that tests its supplied argument, suitable for use with Array.filter

    function M

    M: typeof M;
    • Tests a path against the pattern using the options.

    function makeRe

    makeRe: (pattern: string, options?: IOptions) => RegExp;
    • Make a regular expression object from the pattern.

    function match

    match: (
    list: ReadonlyArray<string>,
    pattern: string,
    options?: IOptions
    ) => string[];
    • Match against the list of files, in the style of fnmatch or glob. If nothing is matched, and options.nonull is set, then return a list containing the pattern itself.

    Interfaces

    interface IMinimatch

    interface IMinimatch {}

      property comment

      comment: boolean;
      • True if the pattern is a comment.

      property empty

      empty: boolean;
      • True if the pattern is ""

      property negate

      negate: boolean;
      • True if the pattern is negated.

      property options

      options: IOptions;
      • The options supplied to the constructor.

      property pattern

      pattern: string;
      • The original pattern the minimatch object represents.

      property regexp

      regexp: RegExp;
      • A single regular expression expressing the entire pattern. Created by the makeRe method.

      property set

      set: any[][];
      • A 2-dimensional array of regexp or string expressions.

      method braceExpand

      braceExpand: (pattern: string, options: IOptions) => void;
      • @deprecated. For internal use.

      method debug

      debug: () => void;
      • @deprecated. For internal use.

      method make

      make: () => void;
      • @deprecated. For internal use.

      method makeRe

      makeRe: () => RegExp;
      • Generate the regexp member if necessary, and return it. Will return false if the pattern is invalid.

      method match

      match: (fname: string) => boolean;
      • Return true if the filename matches the pattern, or false otherwise.

      method matchOne

      matchOne: (files: string[], pattern: string[], partial: boolean) => boolean;
      • Take a /-split filename, and match it against a single row in the regExpSet. This method is mainly for internal use, but is exposed so that it can be used by a glob-walker that needs to avoid excessive filesystem calls.

      method parse

      parse: (pattern: string, isSub?: boolean) => void;
      • @deprecated. For internal use.

      method parseNegate

      parseNegate: () => void;
      • @deprecated. For internal use.

      interface IMinimatchStatic

      interface IMinimatchStatic {}

        property prototype

        prototype: IMinimatch;

          construct signature

          new (pattern: string, options?: IOptions): IMinimatch;

            interface IOptions

            interface IOptions {}

              property debug

              debug?: boolean;
              • Dump a ton of stuff to stderr.

                false

              property dot

              dot?: boolean;
              • Allow patterns to match filenames starting with a period, even if the pattern does not explicitly have a period in that spot.

                false

              property flipNegate

              flipNegate?: boolean;
              • Returns from negate expressions the same as if they were not negated. (Ie, true on a hit, false on a miss.)

                false

              property matchBase

              matchBase?: boolean;
              • If set, then patterns without slashes will be matched against the basename of the path if it contains slashes.

                false

              property nobrace

              nobrace?: boolean;
              • Do not expand {a,b} and {1..3} brace sets.

                false

              property nocase

              nocase?: boolean;
              • Perform a case-insensitive match.

                false

              property nocomment

              nocomment?: boolean;
              • Suppress the behavior of treating # at the start of a pattern as a comment.

                false

              property noext

              noext?: boolean;
              • Disable "extglob" style patterns like +(a|b).

                false

              property noglobstar

              noglobstar?: boolean;
              • Disable ** matching against multiple folder names.

                false

              property nonegate

              nonegate?: boolean;
              • Suppress the behavior of treating a leading ! character as negation.

                false

              property nonull

              nonull?: boolean;
              • When a match is not found by minimatch.match, return a list containing the pattern itself if this option is set. Otherwise, an empty list is returned if there are no matches.

                false

              Package Files (1)

              Dependencies (0)

              No dependencies.

              Dev Dependencies (0)

              No dev dependencies.

              Peer Dependencies (0)

              No peer dependencies.

              Badge

              To add a badge like this onejsDocs.io badgeto your package's README, use the codes available below.

              You may also use Shields.io to create a custom badge linking to https://www.jsdocs.io/package/@types/minimatch.

              • Markdown
                [![jsDocs.io](https://img.shields.io/badge/jsDocs.io-reference-blue)](https://www.jsdocs.io/package/@types/minimatch)
              • HTML
                <a href="https://www.jsdocs.io/package/@types/minimatch"><img src="https://img.shields.io/badge/jsDocs.io-reference-blue" alt="jsDocs.io"></a>