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.0 to 1.19.1

8

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

@@ -16,8 +16,8 @@ "homepage": "https://github.com/uhop/node-re2",

"nan": "^2.17.0",
"node-gyp": "^9.3.1"
"node-gyp": "^9.4.0"
},
"devDependencies": {
"@types/node": "^20.2.3",
"@types/node": "^20.3.1",
"heya-unit": "^0.3.0",
"typescript": "^5.0.4"
"typescript": "^5.1.3"
},

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

@@ -356,2 +356,3 @@ # node-re2 [![NPM version][npm-img]][npm-url]

- 1.19.1 *Bugfix: indices for the `d` flag when `lastIndex` is non zero. Bugfix: the match result. Thx, [teebu](https://github.com/teebu).*
- 1.19.0 *Added `hasIndices` AKA the `d` flag. Thx, [teebu](https://github.com/teebu).*

@@ -358,0 +359,0 @@ - 1.18.3 *Fixed bug with non-matched groups. Thx, [Dan Setterquist](https://github.com/dset).*

@@ -417,3 +417,25 @@ 'use strict';

}
},
function test_hasIndexLastIndex(t) {
'use strict';
const re2 = new RE2('a', 'dg');
eval(t.TEST('re2.lastIndex === 0'));
let result = re2.exec('abca');
eval(t.TEST('re2.lastIndex === 1'));
eval(t.TEST('result.index === 0'));
eval(t.TEST('t.unify(result.indices, [[0, 1]])'));
result = re2.exec('abca');
eval(t.TEST('re2.lastIndex === 4'));
eval(t.TEST('result.index === 3'));
eval(t.TEST('t.unify(result.indices, [[3, 4]])'));
result = re2.exec('abca');
eval(t.TEST('re2.lastIndex === 0'));
eval(t.TEST('result === null'));
}
]);

@@ -154,3 +154,3 @@ 'use strict';

var re = new RE2('(aa)(?<b>b)?(?<c>ccc)', 'd'),
const re = new RE2('(aa)(?<b>b)?(?<c>ccc)', 'd'),
str1 = '1aabccc2',

@@ -161,3 +161,14 @@ str2 = '1aaccc2';

eval(t.TEST("t.unify(str2.match(re), re.exec(str2))"));
},
function test_matchHasIndicesGlobal(t) {
'use strict';
const re = new RE2('(?<zzz>a)', 'dg'),
result = 'abca'.match(re);
eval(t.TEST("t.unify(result, ['a', 'a'])"));
eval(t.TEST("!('indices' in result)"));
eval(t.TEST("!('groups' in result)"));
}
]);

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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