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

re2

Package Overview
Dependencies
Maintainers
1
Versions
77
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

re2 - npm Package Compare versions

Comparing version 1.19.1 to 1.19.2

6

package.json
{
"name": "re2",
"version": "1.19.1",
"version": "1.19.2",
"description": "Bindings for RE2: fast, safe alternative to backtracking regular expression engines.",

@@ -19,5 +19,5 @@ "homepage": "https://github.com/uhop/node-re2",

"devDependencies": {
"@types/node": "^20.3.1",
"@types/node": "^20.4.5",
"heya-unit": "^0.3.0",
"typescript": "^5.1.3"
"typescript": "^5.1.6"
},

@@ -24,0 +24,0 @@ "scripts": {

@@ -32,2 +32,3 @@ 'use strict';

if (!result) break;
if (result[0] === '') ++re.lastIndex;
yield result;

@@ -34,0 +35,0 @@ }

@@ -57,7 +57,7 @@ # node-re2 [![NPM version][npm-img]][npm-url]

* [`re2.multiline`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/RegExp/multiline)
* *Since 1.17.6*: [`re2.dotAll`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/RegExp/dotAll)
* [`re2.dotAll`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/RegExp/dotAll) — *since 1.17.6.*
* [`re2.unicode`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/RegExp/unicode)
* `RE2` engine always works in the Unicode mode. See details below.
* [`re2.sticky`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/RegExp/sticky)
* *Since 1.19.0*: [`re2.hasIndices`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/RegExp/hasIndices)
* [`re2.sticky`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/RegExp/sticky) — *since 1.7.0.*
* [`re2.hasIndices`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/RegExp/hasIndices) — *since 1.19.0.*
* [`re2.source`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/RegExp/source)

@@ -75,3 +75,3 @@ * [`re2.flags`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/RegExp/flags)

* [`re2[Symbol.match](str)`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Symbol/match)
* *Since 1.17.5*: [`re2[Symbol.matchAll](str)`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Symbol/matchAll)
* [`re2[Symbol.matchAll](str)`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Symbol/matchAll) — *since 1.17.5.*
* [`re2[Symbol.search](str)`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Symbol/search)

@@ -358,2 +358,3 @@ * [`re2[Symbol.replace](str, newSubStr|function)`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Symbol/replace)

- 1.19.2 *Bugfix: infinite loop in matchAll() with empty matches. Thx, [ziyunfei](https://github.com/ziyunfei).*
- 1.19.1 *Bugfix: indices for the `d` flag when `lastIndex` is non zero. Bugfix: the match result. Thx, [teebu](https://github.com/teebu).*

@@ -360,0 +361,0 @@ - 1.19.0 *Added `hasIndices` AKA the `d` flag. Thx, [teebu](https://github.com/teebu).*

@@ -80,3 +80,17 @@ 'use strict';

}
},
function test_matchAll_empty_match(t) {
'use strict';
const str = 'foo';
// Matches empty strings, but should not cause an infinite loop
const re = new RE2('(?:)', 'g');
const result = Array.from(str.matchAll(re));
eval(t.TEST('result.length === str.length + 1'));
for (let i = 0; i < result.length; ++i) {
eval(t.TEST('result[i][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