comparators module provides a comprehensive set of comparator functions for sorting various entities in the AnimeThemes Web application, including anime, themes, songs, and resources.
Import
Type Definitions
Utility Functions
either
comparator- The primary comparator function
ComparatorChain<T>- A chainable comparator object withor()andchain()methods
reverse
comparator- The comparator to reverse
Comparator<T>- A reversed comparator
getComparator
name- One of the comparator constant names (e.g.,ANIME_A_Z,SONG_OLD_NEW)
- The corresponding comparator function
sortTransformed
comparator- The comparator to use on transformed valuestransformator- Function to extract/transform the value to compare
Comparator<K>- A comparator for the original type
Anime Comparators
animeNameComparator
animeYearComparator
animeSeasonComparator
animePremiereComparator
Theme Comparators
themeTypeComparator
themeIndexComparator
themeGroupComparator
Song Comparators
songTitleComparator
Other Comparators
entryVersionComparator
studioNameComparator
seriesNameComparator
resourceSiteComparator
resourceAsComparator
Sort Constants
Predefined sort mode identifiers for use withgetComparator():
Anime Sort Modes
Song Sort Modes
Advanced Examples
Complex Theme Sorting
Playlist Track Sorting
See Also
- GraphQL Types - Type definitions for anime, themes, and more