.gitignore added
[dotfiles/.git] / .config / coc / extensions / node_modules / coc-prettier / node_modules / is-supported-regexp-flag / readme.md
1 # is-supported-regexp-flag [![Build Status](https://travis-ci.org/sindresorhus/is-supported-regexp-flag.svg?branch=master)](https://travis-ci.org/sindresorhus/is-supported-regexp-flag)
2
3 > Check whether a RegExp flag is supported. Mostly useful for `y` and `u`.
4
5
6 ## Install
7
8 ```sh
9 $ npm install --save is-supported-regexp-flag
10 ```
11
12
13 ## Usage
14
15 ```js
16 var isSupportedRegexpFlag = require('is-supported-regexp-flag');
17
18 isSupportedRegexpFlag('g'); // as in /foo/g
19 //=> true
20
21 isSupportedRegexpFlag('u');
22 //=> false
23 ```
24
25 RegExp throws if you're trying to use unsupported flags. This is a nicer way to check for support.
26
27
28 ## License
29
30 MIT © [Sindre Sorhus](http://sindresorhus.com)