@algoux/standard-ranklist-utils 0.2.6 → 0.2.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs +3 -1
- package/dist/index.mjs +3 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -567,6 +567,7 @@ function genSeriesCalcFns(series, rows, ranks, officialRanks) {
|
|
|
567
567
|
if (filterTests.length) {
|
|
568
568
|
const currentFilteredRows = [];
|
|
569
569
|
filteredOfficialRanks = filteredOfficialRanks.map(() => null);
|
|
570
|
+
let currentRank = 0;
|
|
570
571
|
let currentOfficialRank2 = 0;
|
|
571
572
|
let currentOfficialRankOld = 0;
|
|
572
573
|
rows.forEach((row, index) => {
|
|
@@ -575,8 +576,9 @@ function genSeriesCalcFns(series, rows, ranks, officialRanks) {
|
|
|
575
576
|
currentFilteredRows.push(row);
|
|
576
577
|
const oldRank = officialRanks[index];
|
|
577
578
|
if (oldRank !== null) {
|
|
579
|
+
currentRank++;
|
|
578
580
|
if (currentOfficialRankOld !== oldRank) {
|
|
579
|
-
currentOfficialRank2
|
|
581
|
+
currentOfficialRank2 = currentRank;
|
|
580
582
|
currentOfficialRankOld = oldRank;
|
|
581
583
|
}
|
|
582
584
|
filteredOfficialRanks[index] = currentOfficialRank2;
|
package/dist/index.mjs
CHANGED
|
@@ -565,6 +565,7 @@ function genSeriesCalcFns(series, rows, ranks, officialRanks) {
|
|
|
565
565
|
if (filterTests.length) {
|
|
566
566
|
const currentFilteredRows = [];
|
|
567
567
|
filteredOfficialRanks = filteredOfficialRanks.map(() => null);
|
|
568
|
+
let currentRank = 0;
|
|
568
569
|
let currentOfficialRank2 = 0;
|
|
569
570
|
let currentOfficialRankOld = 0;
|
|
570
571
|
rows.forEach((row, index) => {
|
|
@@ -573,8 +574,9 @@ function genSeriesCalcFns(series, rows, ranks, officialRanks) {
|
|
|
573
574
|
currentFilteredRows.push(row);
|
|
574
575
|
const oldRank = officialRanks[index];
|
|
575
576
|
if (oldRank !== null) {
|
|
577
|
+
currentRank++;
|
|
576
578
|
if (currentOfficialRankOld !== oldRank) {
|
|
577
|
-
currentOfficialRank2
|
|
579
|
+
currentOfficialRank2 = currentRank;
|
|
578
580
|
currentOfficialRankOld = oldRank;
|
|
579
581
|
}
|
|
580
582
|
filteredOfficialRanks[index] = currentOfficialRank2;
|