Skip to content

Commit

Permalink
Ran deno lint, deno format and deno test found in CONTRIBUTING
Browse files Browse the repository at this point in the history
  • Loading branch information
a2ys committed Jun 18, 2024
1 parent 130267a commit 19f96e7
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
4 changes: 3 additions & 1 deletion src/card.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,9 @@ export class Card {
trophyList.filterByHidden();

if (this.titles.length != 0) {
const includeTitles = this.titles.filter(title => !title.startsWith("-"));
const includeTitles = this.titles.filter((title) =>
!title.startsWith("-")
);
if (includeTitles.length > 0) {
trophyList.filterByTitles(includeTitles);
}
Expand Down
8 changes: 6 additions & 2 deletions src/trophy_list.ts
Original file line number Diff line number Diff line change
Expand Up @@ -77,9 +77,13 @@ export class TrophyList {
);
}
filterByExclusionTitles(titles: Array<string>) {
const excludeTitles = titles.filter(title => title.startsWith("-")).map(title => title.substring(1));
const excludeTitles = titles.filter((title) => title.startsWith("-")).map(
(title) => title.substring(1),
);
if (excludeTitles.length > 0) {
this.trophies = this.trophies.filter(trophy => !excludeTitles.includes(trophy.title));
this.trophies = this.trophies.filter((trophy) =>
!excludeTitles.includes(trophy.title)
);
}
}
sortByRank() {
Expand Down

0 comments on commit 19f96e7

Please sign in to comment.