@@ -40,7 +40,7 @@ console.log(brackets('[![:lower:]]'));
40
40
41
41
## API
42
42
43
- ### [ brackets] ( index.js#L28 )
43
+ ### [ brackets] ( index.js#L27 )
44
44
45
45
Parses the given POSIX character class ` pattern ` and returns a
46
46
string that can be used for creating regular expressions for matching.
@@ -51,7 +51,7 @@ string that can be used for creating regular expressions for matching.
51
51
* ` options ` ** {Object}**
52
52
* ` returns ` ** {Object}**
53
53
54
- ### [ .match] ( index.js#L52 )
54
+ ### [ .match] ( index.js#L51 )
55
55
56
56
Takes an array of strings and a POSIX character class pattern, and returns a new array with only the strings that matched the pattern.
57
57
@@ -65,15 +65,15 @@ Takes an array of strings and a POSIX character class pattern, and returns a new
65
65
** Example**
66
66
67
67
``` js
68
- var brackets = require (' expand-brackets' );
68
+ const brackets = require (' expand-brackets' );
69
69
console .log (brackets .match ([' 1' , ' a' , ' ab' ], ' [[:alpha:]]' ));
70
70
// => ['a']
71
71
72
72
console .log (brackets .match ([' 1' , ' a' , ' ab' ], ' [[:alpha:]]+' ));
73
73
// => ['a', 'ab']
74
74
```
75
75
76
- ### [ .isMatch] ( index.js#L98 )
76
+ ### [ .isMatch] ( index.js#L97 )
77
77
78
78
Returns true if the specified ` string ` matches the given brackets ` pattern ` .
79
79
@@ -87,15 +87,15 @@ Returns true if the specified `string` matches the given brackets `pattern`.
87
87
** Example**
88
88
89
89
``` js
90
- var brackets = require (' expand-brackets' );
90
+ const brackets = require (' expand-brackets' );
91
91
92
92
console .log (brackets .isMatch (' a.a' , ' [[:alpha:]].[[:alpha:]]' ));
93
93
// => true
94
94
console .log (brackets .isMatch (' 1.2' , ' [[:alpha:]].[[:alpha:]]' ));
95
95
// => false
96
96
```
97
97
98
- ### [ .matcher] ( index.js#L121 )
98
+ ### [ .matcher] ( index.js#L120 )
99
99
100
100
Takes a POSIX character class pattern and returns a matcher function. The returned function takes the string to match as its only argument.
101
101
@@ -108,16 +108,16 @@ Takes a POSIX character class pattern and returns a matcher function. The return
108
108
** Example**
109
109
110
110
``` js
111
- var brackets = require (' expand-brackets' );
112
- var isMatch = brackets .matcher (' [[:lower:]].[[:upper:]]' );
111
+ const brackets = require (' expand-brackets' );
112
+ const isMatch = brackets .matcher (' [[:lower:]].[[:upper:]]' );
113
113
114
114
console .log (isMatch (' a.a' ));
115
115
// => false
116
116
console .log (isMatch (' a.A' ));
117
117
// => true
118
118
```
119
119
120
- ### [ .makeRe] ( index.js#L143 )
120
+ ### [ .makeRe] ( index.js#L140 )
121
121
122
122
Create a regular expression from the given ` pattern ` .
123
123
@@ -130,13 +130,13 @@ Create a regular expression from the given `pattern`.
130
130
** Example**
131
131
132
132
``` js
133
- var brackets = require (' expand-brackets' );
134
- var re = brackets .makeRe (' [[:alpha:]]' );
133
+ const brackets = require (' expand-brackets' );
134
+ const re = brackets .makeRe (' [[:alpha:]]' );
135
135
console .log (re);
136
136
// => /^(?:[a-zA-Z])$/
137
137
```
138
138
139
- ### [ .create] ( index.js#L185 )
139
+ ### [ .create] ( index.js#L182 )
140
140
141
141
Parses the given POSIX character class ` pattern ` and returns an object with the compiled ` output ` and optional source ` map ` .
142
142
@@ -149,7 +149,7 @@ Parses the given POSIX character class `pattern` and returns an object with the
149
149
** Example**
150
150
151
151
``` js
152
- var brackets = require (' expand-brackets' );
152
+ const brackets = require (' expand-brackets' );
153
153
console .log (brackets (' [[:alpha:]]' ));
154
154
// { options: { source: 'string' },
155
155
// input: '[[:alpha:]]',
@@ -275,7 +275,7 @@ Pull requests and stars are always welcome. For bugs and feature requests, [plea
275
275
| ** Commits** | ** Contributor** |
276
276
| --- | --- |
277
277
| 69 | [ jonschlinkert] ( https://github.com/jonschlinkert ) |
278
- | 7 | [ danez] ( https://github.com/danez ) |
278
+ | 13 | [ danez] ( https://github.com/danez ) |
279
279
| 2 | [ MartinKolarik] ( https://github.com/MartinKolarik ) |
280
280
| 2 | [ es128] ( https://github.com/es128 ) |
281
281
| 1 | [ doowb] ( https://github.com/doowb ) |
@@ -314,4 +314,4 @@ Released under the [MIT License](LICENSE).
314
314
315
315
***
316
316
317
- _ This file was generated by [ verb-generate-readme] ( https://github.com/verbose/verb-generate-readme ) , v0.6.0, on March 26 , 2018._
317
+ _ This file was generated by [ verb-generate-readme] ( https://github.com/verbose/verb-generate-readme ) , v0.6.0, on April 30 , 2018._
0 commit comments