# is-supported-regexp-flag

> Check whether a RegExp flag is supported

Latest version **2.0.0** (published 2021-07-26) · MIT license · 0 weekly downloads

## Install

```sh
npm install is-supported-regexp-flag
pnpm add is-supported-regexp-flag
yarn add is-supported-regexp-flag
bun add is-supported-regexp-flag
```

## Health

**Score 35/100 (D)** — status: abandoned.

Positive: esm support; no vulnerabilities; high maintenance score.

Warnings: low downloads; no types.

Negative: abandoned.

## Facts

| | |
|---|---|
| Version | 2.0.0 |
| Published | 2021-07-26 |
| First published | 2014-06-14 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | ESM |
| Node | >=12.20 |
| Dependencies | 0 |
| Unpacked size | 2.3 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 9 |
| Author | Sindre Sorhus |
| Maintainers | sindresorhus |
| Keywords | regexp, regex, check, is, support, supported, valid, flag |

## Links

- npm: https://www.npmjs.com/package/is-supported-regexp-flag
- Repository: https://github.com/sindresorhus/is-supported-regexp-flag
- Homepage: https://github.com/sindresorhus/is-supported-regexp-flag#readme
- Issues: https://github.com/sindresorhus/is-supported-regexp-flag/issues
- npm.io page: https://npm.io/package/is-supported-regexp-flag

## Alternatives

- [memory-cache](https://npm.io/package/memory-cache.md) — 795.0K weekly downloads
- [@httptoolkit/proxy-agent](https://npm.io/package/@httptoolkit/proxy-agent.md) — 11.2K weekly downloads
- [express-cache-controller](https://npm.io/package/express-cache-controller.md) — 5.3K weekly downloads
- [http-cache-middleware](https://npm.io/package/http-cache-middleware.md) — 4.5K weekly downloads
- [cache2](https://npm.io/package/cache2.md) — 1.5K weekly downloads

## Recent versions

- 2.0.0 (latest) — 2021-07-26
- 1.0.1 — 2018-03-22
- 1.0.0 — 2014-08-13
- 0.1.0 — 2014-06-14

## README

# is-supported-regexp-flag

> Check whether a RegExp flag is supported

## Install

```
$ npm install is-supported-regexp-flag
```

## Usage

```js
import isSupportedRegexpFlag from 'is-supported-regexp-flag';

isSupportedRegexpFlag('g'); // As in `/foo/g`
//=> true

isSupportedRegexpFlag('u');
//=> false
```

The `RegExp` constructor throws if you're trying to use unsupported flags. This is a nicer way to check for support.

---
_Source: https://npm.io/package/is-supported-regexp-flag · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
