.gitignore added
[dotfiles/.git] / .config / coc / extensions / node_modules / coc-prettier / node_modules / expand-brackets / README.md
1 # expand-brackets [![NPM version](https://img.shields.io/npm/v/expand-brackets.svg?style=flat)](https://www.npmjs.com/package/expand-brackets) [![NPM downloads](https://img.shields.io/npm/dm/expand-brackets.svg?style=flat)](https://npmjs.org/package/expand-brackets) [![Build Status](https://img.shields.io/travis/jonschlinkert/expand-brackets.svg?style=flat)](https://travis-ci.org/jonschlinkert/expand-brackets)
2
3 > Expand POSIX bracket expressions (character classes) in glob patterns.
4
5 ## Install
6
7 Install with [npm](https://www.npmjs.com/):
8
9 ```sh
10 $ npm install expand-brackets --save
11 ```
12
13 ## Usage
14
15 ```js
16 var brackets = require('expand-brackets');
17
18 brackets('[![:lower:]]');
19 //=> '[^a-z]'
20 ```
21
22 ## .isMatch
23
24 Return true if the given string matches the bracket expression:
25
26 ```js
27 brackets.isMatch('A', '[![:lower:]]');
28 //=> true
29
30 brackets.isMatch('a', '[![:lower:]]');
31 //=> false
32 ```
33
34 ## .makeRe
35
36 Make a regular expression from a bracket expression:
37
38 ```js
39 brackets.makeRe('[![:lower:]]');
40 //=> /[^a-z]/
41 ```
42
43 The following named POSIX bracket expressions are supported:
44
45 * `[:alnum:]`: Alphanumeric characters (`a-zA-Z0-9]`)
46 * `[:alpha:]`: Alphabetic characters (`a-zA-Z]`)
47 * `[:blank:]`: Space and tab (`[ t]`)
48 * `[:digit:]`: Digits (`[0-9]`)
49 * `[:lower:]`: Lowercase letters (`[a-z]`)
50 * `[:punct:]`: Punctuation and symbols. (`[!"#$%&'()*+, -./:;<=>?@ [\]^_``{|}~]`)
51 * `[:upper:]`: Uppercase letters (`[A-Z]`)
52 * `[:word:]`: Word characters (letters, numbers and underscores) (`[A-Za-z0-9_]`)
53 * `[:xdigit:]`: Hexadecimal digits (`[A-Fa-f0-9]`)
54
55 Collating sequences are not supported.
56
57 ## Related projects
58
59 You might also be interested in these projects:
60
61 * [extglob](https://www.npmjs.com/package/extglob): Convert extended globs to regex-compatible strings. Add (almost) the expressive power of regular expressions to… [more](https://www.npmjs.com/package/extglob) | [homepage](https://github.com/jonschlinkert/extglob)
62 * [is-extglob](https://www.npmjs.com/package/is-extglob): Returns true if a string has an extglob. | [homepage](https://github.com/jonschlinkert/is-extglob)
63 * [is-glob](https://www.npmjs.com/package/is-glob): Returns `true` if the given string looks like a glob pattern or an extglob pattern.… [more](https://www.npmjs.com/package/is-glob) | [homepage](https://github.com/jonschlinkert/is-glob)
64 * [is-posix-bracket](https://www.npmjs.com/package/is-posix-bracket): Returns true if the given string is a POSIX bracket expression (POSIX character class). | [homepage](https://github.com/jonschlinkert/is-posix-bracket)
65 * [micromatch](https://www.npmjs.com/package/micromatch): Glob matching for javascript/node.js. A drop-in replacement and faster alternative to minimatch and multimatch. Just… [more](https://www.npmjs.com/package/micromatch) | [homepage](https://github.com/jonschlinkert/micromatch)
66
67 ## Contributing
68
69 Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](https://github.com/jonschlinkert/expand-brackets/issues/new).
70
71 ## Building docs
72
73 Generate readme and API documentation with [verb](https://github.com/verbose/verb):
74
75 ```sh
76 $ npm install verb && npm run docs
77 ```
78
79 Or, if [verb](https://github.com/verbose/verb) is installed globally:
80
81 ```sh
82 $ verb
83 ```
84
85 ## Running tests
86
87 Install dev dependencies:
88
89 ```sh
90 $ npm install -d && npm test
91 ```
92
93 ## Author
94
95 **Jon Schlinkert**
96
97 * [github/jonschlinkert](https://github.com/jonschlinkert)
98 * [twitter/jonschlinkert](http://twitter.com/jonschlinkert)
99
100 ## License
101
102 verb © 2016, [Jon Schlinkert](https://github.com/jonschlinkert).
103 Released under the [MIT license](https://github.com/jonschlinkert/expand-brackets/blob/master/LICENSE).
104
105 ***
106
107 _This file was generated by [verb](https://github.com/verbose/verb), v, on April 01, 2016._