Initial commit
[yaffs-website] / node_modules / is-posix-bracket / README.md
1 # is-posix-bracket [![NPM version](https://img.shields.io/npm/v/is-posix-bracket.svg?style=flat)](https://www.npmjs.com/package/is-posix-bracket) [![NPM downloads](https://img.shields.io/npm/dm/is-posix-bracket.svg?style=flat)](https://npmjs.org/package/is-posix-bracket) [![Build Status](https://img.shields.io/travis/jonschlinkert/is-posix-bracket.svg?style=flat)](https://travis-ci.org/jonschlinkert/is-posix-bracket)
2
3 > Returns true if the given string is a POSIX bracket expression (POSIX character class).
4
5 ## Install
6
7 Install with [npm](https://www.npmjs.com/):
8
9 ```sh
10 $ npm install is-posix-bracket --save
11 ```
12
13 ## Usage
14
15 ```js
16 var isPosixBracket = require('is-posix-bracket');
17
18 isPosixBracket('[foo:]]');
19 //=> false
20 isPosixBracket('[xdigit:]]');
21 //=> false
22 isPosixBracket('[[:xdigit:]]');
23 //=> true
24 isPosixBracket('[[:xdigit:]]');
25 //=> true
26 isPosixBracket('[[:alpha:]123]');
27 //=> true
28 isPosixBracket('[[:alpha:]123]');
29 //=> true
30 isPosixBracket('[a-c[:digit:]x-z]');
31 //=> true
32 isPosixBracket('[:al:]');
33 //=> true
34 isPosixBracket('[abc[:punct:][0-9]');
35 //=> true
36 ```
37
38 ## Related projects
39
40 You might also be interested in these projects:
41
42 * [braces](https://www.npmjs.com/package/braces): Fastest brace expansion for node.js, with the most complete support for the Bash 4.3 braces… [more](https://www.npmjs.com/package/braces) | [homepage](https://github.com/jonschlinkert/braces)
43 * [expand-brackets](https://www.npmjs.com/package/expand-brackets): Expand POSIX bracket expressions (character classes) in glob patterns. | [homepage](https://github.com/jonschlinkert/expand-brackets)
44 * [is-extglob](https://www.npmjs.com/package/is-extglob): Returns true if a string has an extglob. | [homepage](https://github.com/jonschlinkert/is-extglob)
45 * [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)
46 * [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)
47
48 ## Contributing
49
50 Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](https://github.com/jonschlinkert/is-posix-bracket/issues/new).
51
52 ## Building docs
53
54 Generate readme and API documentation with [verb](https://github.com/verbose/verb):
55
56 ```sh
57 $ npm install verb && npm run docs
58 ```
59
60 Or, if [verb](https://github.com/verbose/verb) is installed globally:
61
62 ```sh
63 $ verb
64 ```
65
66 ## Running tests
67
68 Install dev dependencies:
69
70 ```sh
71 $ npm install -d && npm test
72 ```
73
74 ## Author
75
76 **Jon Schlinkert**
77
78 * [github/jonschlinkert](https://github.com/jonschlinkert)
79 * [twitter/jonschlinkert](http://twitter.com/jonschlinkert)
80
81 ## License
82
83 Copyright © 2016, [Jon Schlinkert](https://github.com/jonschlinkert).
84 Released under the [MIT license](https://github.com/jonschlinkert/is-posix-bracket/blob/master/LICENSE).
85
86 ***
87
88 _This file was generated by [verb](https://github.com/verbose/verb), v, on April 05, 2016._