Export 0.2.1
[platform/framework/web/web-ui-fw.git] / libs / js / jquery-mobile-1.2.0 / node_modules / grunt / node_modules / jshint / node_modules / minimatch / README.md
1 # minimatch
2
3 A minimal matching utility.
4
5 [![Build Status](https://secure.travis-ci.org/isaacs/minimatch.png)](http://travis-ci.org/isaacs/minimatch)
6
7
8 This is the matching library used internally by npm.
9
10 Eventually, it will replace the C binding in node-glob.
11
12 It works by converting glob expressions into JavaScript `RegExp`
13 objects.
14
15 ## Usage
16
17 ```javascript
18 var minimatch = require("minimatch")
19
20 minimatch("bar.foo", "*.foo") // true!
21 minimatch("bar.foo", "*.bar") // false!
22 ```
23
24 ## Features
25
26 Supports all glob features.
27
28 See:
29
30 * `man sh`
31 * `man fnmatch`
32 * `man 5 gitignore`
33
34 ### Departures from zsh/bash/ksh/sh
35
36 If the pattern starts with a `!` character, then it is negated.
37
38 If a pattern starts with `#`, then it is treated as a comment, and
39 will not match anything.  (Use `\#` to match a literal `#` at the
40 start of a line.)
41
42 The double-star `**` is always supported, instead of requiring a special
43 flag.
44
45 If an escaped pattern has no matches, and the `null` flag is not set,
46 then minimatch.match returns the pattern as-provided, rather than
47 interpreting the character escapes.  For example,
48 `minimatch.match([], "\\*a\\?")` will return `"\\*a\\?"` rather than
49 `"*a?"`.
50
51 ## Functions
52
53 ### minimatch(path, pattern, options)
54
55 Main export.  Tests a path against
56 the pattern using the options.
57
58 ### minimatch.filter(pattern, options)
59
60 Returns a function that tests its
61 supplied argument, suitable for use with `Array.filter`.
62
63 ### minimatch.match(list, pattern, options)
64
65 Match against the list of
66 files, in the style of fnmatch or glob.  If nothing is matched, then
67 return the pattern (unless `{ null: true }` in the options.)
68
69 ### minimatch.makeRe(pattern, options)
70
71 Make a regular expression object
72 from the pattern.
73
74 ## Options
75
76 All options are `false` by default.
77
78 ### debug
79
80 Dump a ton of stuff to stderr.
81
82 ### null
83
84 Return an empty list from minimatch.match, instead of a list
85 containing the pattern itself.
86
87 ### nocase
88
89 Perform a case-insensitive match.
90
91 ### cache
92
93 An LRU cache with `.get(k)` and `.set(k,v)` methods.  By
94 default, an instance of `node-lru-cache` is used, with 1000 max
95 entries.
96
97 ### slash
98
99 If set, then `a/*` will match `a/` as well as `a/b`.
100
101 ### matchBase
102
103 If set, then patterns without slashes will be matched
104 against the basename of the path if it contains slashes.  For example,
105 `a?b` would match `xyz/123/acb`.
106
107 ### partial
108
109 Internal.  Used by `minimatch.makeRe`.
110
111 ### dot
112
113 Allow patterns to match paths starting with a period, even if
114 the pattern does not explicitly start with a period.