Skip to content

Commit b5bdc63

Browse files
Copilotmrjf
andauthored
chore: apply final review polish for testing and regex helpers
Agent-Logs-Url: https://github.com/githubnext/tsessebe/sessions/f96fdffc-2f52-41e9-87fb-6f5a8da2917e Co-authored-by: mrjf <180956+mrjf@users.noreply.github.com>
1 parent 77a3185 commit b5bdc63

2 files changed

Lines changed: 4 additions & 3 deletions

File tree

src/stats/str_findall.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,7 @@ function makeGlobal(pat: string | RegExp, flags?: string): RegExp {
5151
return new RegExp(pat, f);
5252
}
5353

54+
/** Extract named capture-group identifiers from a regex source pattern. */
5455
function extractNamedGroupNames(source: string): string[] {
5556
const names: string[] = [];
5657
const re = /\(\?<([A-Za-z_]\w*)>/g;

src/testing/testing.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -50,15 +50,15 @@ function scalarsEqual(
5050
if (isNull_(a) !== isNull_(b)) {
5151
return false;
5252
}
53+
if (a === b) {
54+
return true;
55+
}
5356
if (isNaN_(a) && isNaN_(b)) {
5457
return true;
5558
}
5659
if (isNaN_(a) !== isNaN_(b)) {
5760
return false;
5861
}
59-
if (a === b) {
60-
return true;
61-
}
6262
if (a instanceof Date && b instanceof Date) {
6363
return a.getTime() === b.getTime();
6464
}

0 commit comments

Comments
 (0)