Options
All
  • Public
  • Public/Protected
  • All
Menu

Hierarchy

Index

Properties

absolute?: boolean
cache?: {}

Type declaration

  • [path: string]: boolean | "DIR" | "FILE" | ReadonlyArray<string>
cwd?: string
debug?: boolean

Dump a ton of stuff to stderr.

dot?: boolean

Allow patterns to match filenames starting with a period, even if the pattern does not explicitly have a period in that spot.

Note that by default, 'a/**' + '/b' will not match a/.d/b, unless dot is set.

flipNegate?: boolean

Returns from negate expressions the same as if they were not negated. (Ie, true on a hit, false on a miss.)

default

false

follow?: boolean
fs?: __module
ignore?: string | readonly string[]
mark?: boolean
matchBase?: any

If set, then patterns without slashes will be matched against the basename of the path if it contains slashes. For example, a?b would match the path /xyz/123/acb, but not /xyz/acb/123.

nobrace?: boolean

Do not expand {a,b} and {1..3} brace sets.

nocase?: boolean

Perform a case-insensitive match.

nocomment?: boolean

Suppress the behavior of treating # at the start of a pattern as a comment.

nodir?: boolean
noext?: boolean

Disable "extglob" style patterns like +(a|b).

noglobstar?: boolean

Disable ** matching against multiple folder names.

nomount?: boolean
nonegate?: boolean

Suppress the behavior of treating a leading ! character as negation.

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.

nosort?: boolean
nounique?: boolean
partial?: boolean

Compare a partial path to a pattern. As long as the parts of the path that are present are not contradicted by the pattern, it will be treated as a match. This is useful in applications where you're walking through a folder structure, and don't yet have the full path, but want to ensure that you do not walk down paths that can never be a match.

default

false

example

import minimatch = require("minimatch");

minimatch('/a/b', '/a/*' + '/c/d', { partial: true }) // true, might be /a/b/c/d minimatch('/a/b', '/' + '/d', { partial: true }) // true, might be /a/b/.../d minimatch('/x/y/z', '/a/' + '/z', { partial: true }) // false, because x !== a

realpath?: boolean
realpathCache?: {}

Type declaration

  • [path: string]: string
root?: string
silent?: boolean
stat?: boolean
statCache?: {}

Type declaration

  • [path: string]: false | { isDirectory: any } | undefined
strict?: boolean
symlinks?: {}

Type declaration

  • [path: string]: boolean | undefined
sync?: boolean
windowsPathsNoEscape?: boolean

Use \\ as a path separator only, and never as an escape character. If set, all \\ characters are replaced with / in the pattern. Note that this makes it impossible to match against paths containing literal glob pattern characters, but allows matching with patterns constructed using path.join() and path.resolve() on Windows platforms, mimicking the (buggy!) behavior of earlier versions on Windows. Please use with caution, and be mindful of the caveat about Windows paths

For legacy reasons, this is also set if options.allowWindowsEscape is set to the exact value false.

default

false