Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

regexpu

Package Overview
Dependencies
Maintainers
1
Versions
48
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

regexpu - npm Package Compare versions

Comparing version 2.0.4 to 2.1.0

12

package.json
{
"name": "regexpu",
"version": "2.0.4",
"version": "2.1.0",
"description": "A source code transpiler that enables the use of ES6 Unicode regular expressions in ES5.",

@@ -55,3 +55,3 @@ "homepage": "https://mths.be/regexpu",

"recast": "^0.11.0",
"regexpu-core": "^1.0.0"
"regexpu-core": "^2.0.0"
},

@@ -62,8 +62,6 @@ "devDependencies": {

"jsesc": "^0.5.0",
"lodash": "^4.0.0",
"mocha": "^2.2.1",
"regexpu-fixtures": "*",
"unicode-5.1.0": "^0.1.5",
"unicode-8.0.0": "^0.1.5"
"lodash": "^4.3.0",
"mocha": "^2.4.5",
"regexpu-fixtures": "*"
}
}

@@ -94,6 +94,6 @@ # regexpu [![Build status](https://travis-ci.org/mathiasbynens/regexpu.svg?branch=master)](https://travis-ci.org/mathiasbynens/regexpu) [![Code coverage status](http://img.shields.io/coveralls/mathiasbynens/regexpu/master.svg)](https://coveralls.io/r/mathiasbynens/regexpu) [![Dependency status](https://gemnasium.com/mathiasbynens/regexpu.svg)](https://gemnasium.com/mathiasbynens/regexpu)

// Instead of…
var rewritePattern = require('regexpu').rewritePattern;
const rewritePattern = require('regexpu').rewritePattern;
// Use this:
var rewritePattern = require('regexpu-core');
const rewritePattern = require('regexpu-core');
```

@@ -108,7 +108,7 @@

```js
var regexpu = require('regexpu');
var recast = require('recast');
var tree = recast.parse(code); // ES6 code
tree = regexpu.transform(tree);
var result = recast.print(tree);
const regexpu = require('regexpu');
const recast = require('recast');
const tree = recast.parse(code); // ES6 code
const transformedTree = regexpu.transform(tree);
const result = recast.print(transformedTree);
console.log(result.code); // transpiled ES5 code

@@ -121,3 +121,3 @@ console.log(result.map); // source map

```js
var transformTree = require('regexpu/transform-tree');
const transformTree = require('regexpu/transform-tree');
```

@@ -132,4 +132,4 @@

```js
var es6 = 'console.log(/foo.bar/u.test("foo💩bar"));';
var es5 = regexpu.transpileCode(es6);
const es6 = 'console.log(/foo.bar/u.test("foo💩bar"));';
const es5 = regexpu.transpileCode(es6);
// → 'console.log(/foo(?:[\\0-\\t\\x0B\\f\\x0E-\\u2027\\u202A-\\uD7FF\\uDC00-\\uFFFF]|[\\uD800-\\uDBFF][\\uDC00-\\uDFFF]|[\\uD800-\\uDBFF])bar/.test("foo💩bar"));'

@@ -146,3 +146,3 @@ ```

```js
var result = regexpu.transpileCode(code, {
const result = regexpu.transpileCode(code, {
'sourceFileName': 'es6.js',

@@ -158,3 +158,3 @@ 'sourceMapName': 'es6.js.map',

```js
var transpileCode = require('regexpu/transpile-code');
const transpileCode = require('regexpu/transpile-code');
```

@@ -161,0 +161,0 @@

SocketSocket SOC 2 Logo

Product

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

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc