.gitignore added
[dotfiles/.git] / .config / coc / extensions / node_modules / coc-prettier / node_modules / fast-glob / node_modules / glob-parent / node_modules / is-glob / README.md
1 # is-glob [![NPM version](https://img.shields.io/npm/v/is-glob.svg?style=flat)](https://www.npmjs.com/package/is-glob) [![NPM downloads](https://img.shields.io/npm/dm/is-glob.svg?style=flat)](https://npmjs.org/package/is-glob) [![Build Status](https://img.shields.io/travis/jonschlinkert/is-glob.svg?style=flat)](https://travis-ci.org/jonschlinkert/is-glob)
2
3 > Returns `true` if the given string looks like a glob pattern or an extglob pattern. This makes it easy to create code that only uses external modules like node-glob when necessary, resulting in much faster code execution and initialization time, and a better user experience.
4
5 ## Install
6
7 Install with [npm](https://www.npmjs.com/):
8
9 ```sh
10 $ npm install --save is-glob
11 ```
12
13 You might also be interested in [is-valid-glob](https://github.com/jonschlinkert/is-valid-glob) and [has-glob](https://github.com/jonschlinkert/has-glob).
14
15 ## Usage
16
17 ```js
18 var isGlob = require('is-glob');
19 ```
20
21 **True**
22
23 Patterns that have glob characters or regex patterns will return `true`:
24
25 ```js
26 isGlob('!foo.js');
27 isGlob('*.js');
28 isGlob('**/abc.js');
29 isGlob('abc/*.js');
30 isGlob('abc/(aaa|bbb).js');
31 isGlob('abc/[a-z].js');
32 isGlob('abc/{a,b}.js');
33 isGlob('abc/?.js');
34 //=> true
35 ```
36
37 Extglobs
38
39 ```js
40 isGlob('abc/@(a).js');
41 isGlob('abc/!(a).js');
42 isGlob('abc/+(a).js');
43 isGlob('abc/*(a).js');
44 isGlob('abc/?(a).js');
45 //=> true
46 ```
47
48 **False**
49
50 Escaped globs or extglobs return `false`:
51
52 ```js
53 isGlob('abc/\\@(a).js');
54 isGlob('abc/\\!(a).js');
55 isGlob('abc/\\+(a).js');
56 isGlob('abc/\\*(a).js');
57 isGlob('abc/\\?(a).js');
58 isGlob('\\!foo.js');
59 isGlob('\\*.js');
60 isGlob('\\*\\*/abc.js');
61 isGlob('abc/\\*.js');
62 isGlob('abc/\\(aaa|bbb).js');
63 isGlob('abc/\\[a-z].js');
64 isGlob('abc/\\{a,b}.js');
65 isGlob('abc/\\?.js');
66 //=> false
67 ```
68
69 Patterns that do not have glob patterns return `false`:
70
71 ```js
72 isGlob('abc.js');
73 isGlob('abc/def/ghi.js');
74 isGlob('foo.js');
75 isGlob('abc/@.js');
76 isGlob('abc/+.js');
77 isGlob();
78 isGlob(null);
79 //=> false
80 ```
81
82 Arrays are also `false` (If you want to check if an array has a glob pattern, use [has-glob](https://github.com/jonschlinkert/has-glob)):
83
84 ```js
85 isGlob(['**/*.js']);
86 isGlob(['foo.js']);
87 //=> false
88 ```
89
90 ## About
91
92 ### Related projects
93
94 * [assemble](https://www.npmjs.com/package/assemble): Get the rocks out of your socks! Assemble makes you fast at creating web projects… [more](https://github.com/assemble/assemble) | [homepage](https://github.com/assemble/assemble "Get the rocks out of your socks! Assemble makes you fast at creating web projects. Assemble is used by thousands of projects for rapid prototyping, creating themes, scaffolds, boilerplates, e-books, UI components, API documentation, blogs, building websit")
95 * [base](https://www.npmjs.com/package/base): base is the foundation for creating modular, unit testable and highly pluggable node.js applications, starting… [more](https://github.com/node-base/base) | [homepage](https://github.com/node-base/base "base is the foundation for creating modular, unit testable and highly pluggable node.js applications, starting with a handful of common methods, like `set`, `get`, `del` and `use`.")
96 * [update](https://www.npmjs.com/package/update): Be scalable! Update is a new, open source developer framework and CLI for automating updates… [more](https://github.com/update/update) | [homepage](https://github.com/update/update "Be scalable! Update is a new, open source developer framework and CLI for automating updates of any kind in code projects.")
97 * [verb](https://www.npmjs.com/package/verb): Documentation generator for GitHub projects. Verb is extremely powerful, easy to use, and is used… [more](https://github.com/verbose/verb) | [homepage](https://github.com/verbose/verb "Documentation generator for GitHub projects. Verb is extremely powerful, easy to use, and is used on hundreds of projects of all sizes to generate everything from API docs to readmes.")
98
99 ### Contributing
100
101 Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](../../issues/new).
102
103 ### Contributors
104
105 | **Commits** | **Contributor**<br/> | 
106 | --- | --- |
107 | 40 | [jonschlinkert](https://github.com/jonschlinkert) |
108 | 1 | [tuvistavie](https://github.com/tuvistavie) |
109
110 ### Building docs
111
112 _(This document was generated by [verb-generate-readme](https://github.com/verbose/verb-generate-readme) (a [verb](https://github.com/verbose/verb) generator), please don't edit the readme directly. Any changes to the readme must be made in [.verb.md](.verb.md).)_
113
114 To generate the readme and API documentation with [verb](https://github.com/verbose/verb):
115
116 ```sh
117 $ npm install -g verb verb-generate-readme && verb
118 ```
119
120 ### Running tests
121
122 Install dev dependencies:
123
124 ```sh
125 $ npm install -d && npm test
126 ```
127
128 ### Author
129
130 **Jon Schlinkert**
131
132 * [github/jonschlinkert](https://github.com/jonschlinkert)
133 * [twitter/jonschlinkert](http://twitter.com/jonschlinkert)
134
135 ### License
136
137 Copyright © 2016, [Jon Schlinkert](https://github.com/jonschlinkert).
138 Released under the [MIT license](https://github.com/jonschlinkert/is-glob/blob/master/LICENSE).
139
140 ***
141
142 _This file was generated by [verb-generate-readme](https://github.com/verbose/verb-generate-readme), v0.1.31, on October 12, 2016._