-
-
Notifications
You must be signed in to change notification settings - Fork 32.7k
Closed
Labels
v8 engineIssues and PRs related to the V8 dependency.Issues and PRs related to the V8 dependency.
Description
node:v12.11.0
There is inconsistent ordering for named capture groups
from v12.10.0 to v12.11.0. It appears that versions that came before v12.11.0 ordered the keys by the way they were ordered in the regular expression. v12.11.0 seems to sort the keys.
const r = /(?<BKey>.+)\s(?<AKey>.+)/;
const s = 'example string';
// node v12.10.0
r.exec(s).groups;
// { "BKey": "example", "AKey": "string" }
// node v12.11.0
r.exec(s).groups;
// { "AKey": "string", "BKey": "example" }
simlu and MacMcIrish
Metadata
Metadata
Assignees
Labels
v8 engineIssues and PRs related to the V8 dependency.Issues and PRs related to the V8 dependency.