lol-constants 2.9.1 → 2.11.0

Sign up to get free protection for your applications and to get access to all the features.
package/README.md CHANGED
@@ -1,6 +1,7 @@
1
- Provides constants and types for League of Legends related stuff within the context of [Riot APIs](https://developer.riotgames.com/docs/lol). Types such as [`ChampionId`](src/core/constants/Champions/ChampionIds.ts), [`ChampionName`](src/core/constants/Champions/ChampionNames.ts), [`ItemKey`](src/core/constants/Items/ItemKeys.ts), [`RuneId`](src/core/constants/Runes/RuneSetsByRuneNames.ts#L55), [`SpellName`](src/core/constants/Spells/SpellNames.ts), [`Position`](src/core/constants/Positions.ts), [`QueueType`](src/core/constants/QueueTypes.ts), [`RankedTier`](src/core/constants/RankedTiers.ts), [`Region`](src/core/constants/Regions.ts) and more are provided. Certain URLs and URIs are available as constants as well in [`DataDragonUrls`](src/core/constants/DataDragonUrls.ts), [`PlatformApiUris`](src/core/constants/PlatformApiUris.ts), [`RegionalApiUris`](src/core/constants/RegionalApiUris.ts).
1
+ Provides constants and types for League of Legends related stuff within the context of [Riot APIs](https://developer.riotgames.com/docs/lol). Types such as [`ChampionId`](src/core/constants/Champions/ChampionIds.ts), [`ChampionName`](src/core/constants/Champions/ChampionNames.ts), [`ItemKey`](src/core/constants/Items/ItemKeys.ts), [`RuneId`](src/core/constants/Runes/RuneSetsByRuneNames.ts#L55), [`SpellName`](src/core/constants/Spells/SpellNames.ts), [`Position`](src/core/constants/Positions.ts), [`QueueType`](src/core/constants/QueueTypes.ts), [`RankedTier`](src/core/constants/RankedTiers.ts), [`Region`](src/core/constants/Regions.ts) and more are provided. Certain URLs and URIs are available as constants as well: [`DataDragonUrls`](src/core/constants/DataDragonUrls.ts), [`PlatformApiUris`](src/core/constants/PlatformApiUris.ts), [`RegionalApiUris`](src/core/constants/RegionalApiUris.ts).
2
2
 
3
3
  Advantages:
4
+ - Types
4
5
  - Four categories — champions, items, runes, summoner spells — are armed with getter functions that exchange between id–key–name such as [`getChampionNameByKey`](src/core/helpers/Champions/getChampionNameByKey.ts)–[`getChampionIdByName`](src/core/helpers/Champions/getChampionIdByName.ts)–[`getChampionKeyById`](src/core/helpers/Champions/getChampionKeyById.ts)
5
6
  - Types can be validated through type-validating functions such as [`isChampionName`](src/core/helpers/Champions/isChampionName.ts)
6
7
  - Type validation functions such as [`isChampionName`](src/core/helpers/Champions/isChampionName.ts) and getter functions such as [`getChampionNameByKey`](src/core/helpers/Champions/getChampionNameByKey.ts) are instantaneous $O(1)$ and do not iterate over many elements
@@ -8,8 +9,20 @@ Advantages:
8
9
  # Champions
9
10
  | constants | types | getters | type-validators
10
11
  | --- | --- | --- | --- |
11
- | `ChampionIds`, `ChampionIdsByName`, `ChampionKeys`, `ChampionKeysNum`, `ChampionNames` | `ChampionId`, `ChampionKey`, `ChampionKeyNum`, `ChampionName` | `getChampionIdByKey`, `getChampionIdByName`, `getChampionKeyById`, `getChampionKeyByName`, `getChampionNameById`, `getChampionNameByKey` | `isChampionId`, `isChampionKey`, `isChampionKeyNum`, `isChampionName`
12
+ `ChampionIds`, `ChampionIdsByName`, `ChampionKeys`, `ChampionKeysNum`, `ChampionNames` | `ChampionId`, `ChampionKey`, `ChampionKeyNum`, `ChampionName` | `getChampionIdByKey`, `getChampionIdByName`, `getChampionKeyById`, `getChampionKeyByName`, `getChampionNameById`, `getChampionNameByKey` | `isChampionId`, `isChampionKey`, `isChampionKeyNum`, `isChampionName`
12
13
  # Items
14
+ | constants | types | getters | type-validators
15
+ | --- | --- | --- | --- |
16
+ `BootsItemKeys`, `BootsItemKeysNum`, `BootsItemNames`, `ItemKeys`, `ItemKeysNum`, `ItemNames`, `ItemTypes`, `LegendaryItemKeys`, `LegendaryItemKeysNum`, `LegendaryItemNames`, `MythicItemKeys`, `MythicItemKeysNum`, `MythicItemNames`, `OrnnItemKeys`, `OrnnItemKeysNum`, `OrnnItemNames` | `BootsItemKey`, `BootsItemKeyNum`, `BootsItemName`, `ItemKey`, `ItemKeyNum`, `ItemName`, `ItemType`, `LegendaryItemKey`, `LegendaryItemKeyNum`, `LegendaryItemName`, `MythicItemKey`, `MythicItemKeyNum`, `MythicItemName`, `OrnnItemKey`, `OrnnItemKeyNum`, `OrnnItemName` | `getItemKeyByName`, `getItemNameByKey` | `isBootsItemKey`, `isBootsItemKeyNum`, `isBootsItemName`, `isItemKey`, `isItemKeyNum`, `isItemName`, `isItemType`, `isLegendaryItemKey`, `isLegendaryItemKeyNum`, `isLegendaryItemName`, `isMythicItemKey`, `isMythicItemKeyNum`, `isMythicItemName`, `isOrnnItemKey`, `isOrnnItemKeyNum`, `isOrnnItemName`
13
17
  # Runes
18
+ | constants | types | getters | type-validators
19
+ | --- | --- | --- | --- |
20
+ `KeystoneIds`, `KeystoneIdsNum`, `KeystoneNames`, `NonStatRuneIds`, `NonStatRuneIdsNum`, `NonStatRuneNames`, `PrimaryRuneTrees`, `PrimaryRuneTreesByRuneNames`, `PrimaryRuneTreesByRuneNamesNum`, `RuneHSets`, `RuneHSetsByRuneNames`, `RuneHSetsByRuneNamesNum`, `RuneIconFileNames`, `RuneIds`, `RuneIdsNum`, `RuneNames`, `RunePickingRelationships`, `RuneSets`, `RuneSetsByRuneNames`, `RuneSetsByRuneNamesNum`, `RuneTreeIds`, `RuneTreeIdsNum`, `RuneTreeNames`, `RuneTreeTypes`, `SecondaryRuneTrees`, `SecondaryRuneTreesByRuneNames`, `SecondaryRuneTreesByRuneNamesNum`, `StatRuneHSets`, `StatRuneHSetsByRuneNames`, `StatRuneHSetsByRuneNamesNum`, `StatRuneIds`, `StatRuneIdsNum`, `StatRuneNames` | `NonStatRuneId`, `NonStatRuneIdNum`, `NonStatRuneName`, `RuneIconFile`, `RuneId`, `RuneIdNum`, `RuneName`, `RuneTreeId`, `RuneTreeIdNum`, `RuneTreeName`, `RuneTreeType`, `StatRuneId`, `StatRuneIdNum`, `StatRuneName` | `getNonStatRuneIdByName`, `getNonStatRuneNameById`, `getRuneCategoryName`, `getRuneCdnUrl`, `getRuneIdByName`, `getRuneNameById`, `getRuneTreeIdByName`, `getRuneTreeIdNumByName`, `getRuneTreeNameById`, `getStatRuneIdByName`, `getStatRuneNameById` | `isDominationRuneId`, `isDominationRuneIdNum`, `isDominationRuneName`, `isInspirationRuneId`, `isInspirationRuneIdNum`, `isInspirationRuneName`, `isKeystoneRuneId`, `isKeystoneRuneIdNum`, `isKeystoneRuneName`, `isNonStatRuneId`, `isNonStatRuneIdNum`, `isNonStatRuneName`, `isPrecisionRuneId`, `isPrecisionRuneIdNum`, `isPrecisionRuneName`, `isResolveRuneId`, `isResolveRuneIdNum`, `isResolveRuneName`, `isRuneId`, `isRuneIdNum`, `isRuneName`, `isRuneTreeId`, `isRuneTreeIdNum`, `isRuneTreeName`, `isRuneTreeType`, `isSorceryRuneId`, `isSorceryRuneIdNum`, `isSorceryRuneName`, `isStatRuneId`, `isStatRuneIdNum`, `isStatRuneName`
14
21
  # Summoner spells
22
+ | constants | types | getters | type-validators
23
+ | --- | --- | --- | --- |
24
+ `SpellIds`, `SpellIdsByName`, `SpellKeys`, `SpellKeysNum`, `SpellNames` | `SpellId`, `SpellKey`, `SpellKeyNum`, `SpellName` | `getSpellIdByKey`, `getSpellIdByName`, `getSpellKeyById`, `getSpellKeyByName`, `getSpellNameById`, `getSpellNameByKey` | `isSpellId`, `isSpellKey`, `isSpellKeyNum`, `isSpellName`
15
25
  # Other
26
+ | constants | types | type-validators
27
+ | --- | --- | --- |
28
+ `BuildingTypes`, `Continents`, `DataDragonUrls`, `DragonTypes`, `GameModes`, `GameTypes`, `KillTypes`, `Lanes`, `LaneTypes`, `Levels`, `Locales`, `MapIds`, `MonsterTypes`, `ParticipantIds`, `PlatformApiUris`, `PlatformIds`, `Positions`, `QueueDescriptions:`, `QueueIds`, `QueueTypes`, `RankedRanks`, `RankedTiers`, `RegionalApiUris`, `Regions`, `RelativeTeams`, `Roles`, `Skills`, `SkillSlots`, `TeamIds`, `TowerTypes`, `WardTypes` | `BuildingType`, `Continent`, `DragonType`, `GameMode`, `GameType`, `KillType`, `Lane`, `LaneType`, `Level`, `Locale`, `MapId`, `MonsterType`, `ParticipantId`, `PlatformApiUri`, `PlatformId`, `Position`, `QueueId`, `QueueType`, `RankedRank`, `RankedTier`, `RegionalApiUri`, `Region`, `RelativeTeam`, `Role`, `Skill`, `SkillSlot`, `TeamId`, `TowerType`, `WardType` | `isBuildingType`, `isContinent`, `isDragonType`, `isGameMode`, `isGameType`, `isKillType`, `isLane`, `isLaneType`, `isLevel`, `isLocale`, `isMapId`, `isMonsterType`, `isParticipantId`, `isPlatformApiUri`, `isPlatformId`, `getPlatformIdByRegion`, `isPosition`, `isQueueId`, `isQueueType`, `isRankedRank`, `isRankedTier`, `isRegionalApiUri`, `isRegion`, `getRegionByPlatformId`, `isRelativeTeam`, `isRole`, `isSkill`, `isSkillSlot`, `isTeamId`, `isTowerType`, `isWardType`