@algoux/standard-ranklist-utils 0.2.6 → 0.2.7

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 CHANGED
@@ -567,16 +567,18 @@ 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) => {
573
574
  const shouldInclude = filterTests.every((test) => test(row));
574
575
  if (shouldInclude) {
575
576
  currentFilteredRows.push(row);
577
+ currentRank++;
576
578
  const oldRank = officialRanks[index];
577
579
  if (oldRank !== null) {
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,16 +565,18 @@ 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) => {
571
572
  const shouldInclude = filterTests.every((test) => test(row));
572
573
  if (shouldInclude) {
573
574
  currentFilteredRows.push(row);
575
+ currentRank++;
574
576
  const oldRank = officialRanks[index];
575
577
  if (oldRank !== null) {
576
578
  if (currentOfficialRankOld !== oldRank) {
577
- currentOfficialRank2++;
579
+ currentOfficialRank2 = currentRank;
578
580
  currentOfficialRankOld = oldRank;
579
581
  }
580
582
  filteredOfficialRanks[index] = currentOfficialRank2;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@algoux/standard-ranklist-utils",
3
- "version": "0.2.6",
3
+ "version": "0.2.7",
4
4
  "author": "bLue",
5
5
  "keywords": [
6
6
  "standard ranklist",