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)
3 > Check whether a RegExp flag is supported. Mostly useful for `y` and `u`.
9 $ npm install --save is-supported-regexp-flag
16 var isSupportedRegexpFlag = require('is-supported-regexp-flag');
18 isSupportedRegexpFlag('g'); // as in /foo/g
21 isSupportedRegexpFlag('u');
25 RegExp throws if you're trying to use unsupported flags. This is a nicer way to check for support.
30 MIT © [Sindre Sorhus](http://sindresorhus.com)