Socket
Socket
Sign inDemoInstall

@babel/plugin-transform-unicode-regex

Package Overview
Dependencies
91
Maintainers
5
Versions
68
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 7.0.0-beta.49 to 7.0.0-beta.50

10

package.json
{
"name": "@babel/plugin-transform-unicode-regex",
"version": "7.0.0-beta.49",
"version": "7.0.0-beta.50",
"description": "Compile ES2015 Unicode regex to ES5",

@@ -12,4 +12,4 @@ "repository": "https://github.com/babel/babel/tree/master/packages/babel-plugin-transform-unicode-regex",

"dependencies": {
"@babel/helper-plugin-utils": "7.0.0-beta.49",
"@babel/helper-regex": "7.0.0-beta.49",
"@babel/helper-plugin-utils": "7.0.0-beta.50",
"@babel/helper-regex": "7.0.0-beta.50",
"regexpu-core": "^4.1.3"

@@ -21,5 +21,5 @@ },

"devDependencies": {
"@babel/core": "7.0.0-beta.49",
"@babel/helper-plugin-test-runner": "7.0.0-beta.49"
"@babel/core": "7.0.0-beta.50",
"@babel/helper-plugin-test-runner": "7.0.0-beta.50"
}
}
# @babel/plugin-transform-unicode-regex
> Compile ES2015 unicode regex to ES5
> Compile ES2015 Unicode regex to ES5
## Example
See our website [@babel/plugin-transform-unicode-regex](https://new.babeljs.io/docs/en/next/babel-plugin-transform-unicode-regex.html) for more information.
**In**
## Install
```js
var string = "foo💩bar";
var match = string.match(/foo(.)bar/u);
```
Using npm:
**Out**
```js
var string = "foo💩bar";
var match = string.match(/foo((?:[\0-\t\x0B\f\x0E-\u2027\u202A-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]))bar/);
```
## Installation
```sh
npm install --save-dev @babel/plugin-transform-unicode-regex
npm install --save @babel/plugin-transform-unicode-regex
```
## Usage
or using yarn:
### Via `.babelrc` (Recommended)
**.babelrc**
```json
{
"plugins": ["@babel/plugin-transform-unicode-regex"]
}
```
### Via CLI
```sh
babel --plugins @babel/plugin-transform-unicode-regex script.js
yarn add --save @babel/plugin-transform-unicode-regex
```
### Via Node API
```javascript
require("@babel/core").transform("code", {
plugins: ["@babel/plugin-transform-unicode-regex"]
});
```
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc