# babel-plugin-transform-unicode-property-regex

> Compile Unicode property escapes in Unicode regular expressions to ES5.

Latest version **2.0.5** (published 2017-09-18) · MIT license · 0 weekly downloads

> **Deprecated.** This package is deprecated.

## Install

```sh
npm install babel-plugin-transform-unicode-property-regex
pnpm add babel-plugin-transform-unicode-property-regex
yarn add babel-plugin-transform-unicode-property-regex
bun add babel-plugin-transform-unicode-property-regex
```

## Health

**Score 10/100 (F)** — status: deprecated.

Negative: deprecated.

## Facts

| | |
|---|---|
| Version | 2.0.5 |
| Published | 2017-09-18 |
| First published | 2016-06-02 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Node | >=4 |
| Dependencies | 2 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 18 |
| Maintainers | mathias |
| Keywords | babel-plugin, regex, regexp, regular expressions, unicode properties, unicode |

## Links

- npm: https://www.npmjs.com/package/babel-plugin-transform-unicode-property-regex
- Repository: https://github.com/mathiasbynens/babel-plugin-transform-unicode-property-regex
- Issues: https://github.com/mathiasbynens/babel-plugin-transform-unicode-property-regex/issues
- npm.io page: https://npm.io/package/babel-plugin-transform-unicode-property-regex

## Dependencies (2)

- [regexpu-core](https://npm.io/package/regexpu-core.md) ^4.1.3
- [babel-helper-regex](https://npm.io/package/babel-helper-regex.md) ^6.26.0

## Alternatives

- [@openai/codex-sdk](https://npm.io/package/@openai/codex-sdk.md) — 731.4K weekly downloads
- [babel-plugin-transform-react-jsx](https://npm.io/package/babel-plugin-transform-react-jsx.md) — 565.0K weekly downloads
- [babel-helper-remove-or-void](https://npm.io/package/babel-helper-remove-or-void.md) — 508.5K weekly downloads
- [@pnpm/store-controller-types](https://npm.io/package/@pnpm/store-controller-types.md) — 186.9K weekly downloads
- [react-native-signature-canvas](https://npm.io/package/react-native-signature-canvas.md) — 155.6K weekly downloads

## Recent versions

- 2.0.5 (latest) — 2017-09-18
- 2.0.4 — 2017-08-19
- 2.0.3 — 2017-08-17
- 2.0.2 — 2017-06-21
- 2.0.1 — 2017-03-08
- 2.0.0 — 2017-01-20
- 1.0.0 — 2016-06-02

## README

# babel-plugin-transform-unicode-property-regex [![Build status](https://travis-ci.org/mathiasbynens/babel-plugin-transform-unicode-property-regex.svg?branch=master)](https://travis-ci.org/mathiasbynens/babel-plugin-transform-unicode-property-regex)

Compile [Unicode property escapes](https://github.com/mathiasbynens/regexpu-core/blob/master/property-escapes.md) (`\p{…}` and `\P{…}`) in Unicode regular expressions to ES5 or ES6 that works in today’s environments.

**Note:** the Unicode property escape syntax is non-standard and may or may not reflect what eventually gets specified.

[Here’s an online demo.](https://mothereff.in/regexpu#input=var+regex+%3D+/%5Cp%7BScript_Extensions%3DGreek%7D/u%3B&unicodePropertyEscape=1)

## Installation

```sh
$ npm install babel-plugin-transform-unicode-property-regex
```

## Usage

### Via `.babelrc` (recommended)

`.babelrc`

```json
{
  "plugins": ["transform-unicode-property-regex"]
}
```

### Via CLI

```sh
$ babel --plugins transform-unicode-property-regex script.js
```

### Via Node.js API

```js
require('babel-core').transform(code, {
  'plugins': ['transform-unicode-property-regex']
});
```

To transpile to ES6/ES2015:

```js
require('babel-core').transform(code, {
  'plugins': [
    ['transform-unicode-property-regex', { 'useUnicodeFlag': true }]
  ]
});
```

## Author

| [![twitter/mathias](https://gravatar.com/avatar/24e08a9ea84deb17ae121074d0f17125?s=70)](https://twitter.com/mathias "Follow @mathias on Twitter") |
|---|
| [Mathias Bynens](https://mathiasbynens.be/) |

## License

This code is available under the [MIT](https://mths.be/mit) license.

---
_Source: https://npm.io/package/babel-plugin-transform-unicode-property-regex · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
