lol-constants 2.26.0 → 3.0.0-rc.1
Sign up to get free protection for your applications and to get access to all the features.
- package/README.md +130 -28
- package/dist/Locale.d.ts +2 -0
- package/dist/Patch.d.ts +3 -0
- package/dist/Patch.js +3 -0
- package/{core/constants/Champions/ChampionClasses.d.ts → dist/constants/custom.d.ts} +1 -1
- package/{core/constants/Champions/ChampionClasses.js → dist/constants/custom.js} +2 -2
- package/dist/constants/events.d.ts +49 -0
- package/dist/constants/events.js +55 -0
- package/dist/constants/history.d.ts +26 -0
- package/dist/constants/history.js +29 -0
- package/{core/constants/RankedTiers.d.ts → dist/constants/leagues.d.ts} +9 -1
- package/{core/constants/RankedTiers.js → dist/constants/leagues.js} +11 -2
- package/{core/constants/Locales.d.ts → dist/constants/locales.d.ts} +1 -1
- package/{core/constants/Locales.js → dist/constants/locales.js} +2 -2
- package/dist/constants/participants.d.ts +38 -0
- package/dist/constants/participants.js +43 -0
- package/dist/enums/ItemSrTypes.d.ts +11 -0
- package/dist/enums/ItemSrTypes.js +10 -0
- package/dist/enums/StatRuneSlots.d.ts +6 -0
- package/dist/enums/StatRuneSlots.js +5 -0
- package/dist/helpers/champion.d.ts +678 -0
- package/dist/helpers/champion.js +18 -0
- package/dist/helpers/item.d.ts +39 -0
- package/dist/helpers/item.js +113 -0
- package/dist/helpers/riotId.d.ts +16 -0
- package/dist/helpers/riotId.js +34 -0
- package/dist/helpers/rune.d.ts +36 -0
- package/dist/helpers/rune.js +70 -0
- package/dist/helpers/spell.d.ts +6 -0
- package/dist/helpers/spell.js +18 -0
- package/dist/helpers/type.d.ts +3 -0
- package/dist/index.d.ts +30 -0
- package/dist/index.js +27 -0
- package/dist/lol.d.ts +4029 -0
- package/dist/lol.js +182 -0
- package/dist/objects/Maps.d.ts +113 -0
- package/dist/objects/Maps.js +69 -0
- package/dist/objects/Queues.d.ts +192 -0
- package/dist/objects/Queues.js +71 -0
- package/dist/objects/Regions.d.ts +132 -0
- package/dist/objects/Regions.js +55 -0
- package/dist/objects/generated/Champions.d.ts +1858 -0
- package/dist/objects/generated/Champions.js +4 -0
- package/dist/objects/generated/Items.d.ts +5108 -0
- package/dist/objects/generated/Items.js +4 -0
- package/dist/objects/generated/Runes.d.ts +1477 -0
- package/dist/objects/generated/Runes.js +13 -0
- package/dist/objects/generated/Spells.d.ts +208 -0
- package/dist/objects/generated/Spells.js +4 -0
- package/package.json +17 -15
- package/assets/constants/BootsItemNames.d.ts +0 -1
- package/assets/constants/BootsItemNames.js +0 -13
- package/assets/constants/LegendaryItemNames.d.ts +0 -4
- package/assets/constants/LegendaryItemNames.js +0 -125
- package/assets/constants/StatRunes.d.ts +0 -28
- package/assets/constants/StatRunes.js +0 -11
- package/assets/constants/StatRunesByRow.d.ts +0 -17
- package/assets/constants/StatRunesByRow.js +0 -17
- package/assets/constants/base/Champion.d.ts +0 -7903
- package/assets/constants/base/Champion.js +0 -1
- package/assets/constants/base/Item.d.ts +0 -21193
- package/assets/constants/base/Item.js +0 -1
- package/assets/constants/base/RunesReforged.d.ts +0 -491
- package/assets/constants/base/RunesReforged.js +0 -1
- package/assets/constants/base/Summoner.d.ts +0 -582
- package/assets/constants/base/Summoner.js +0 -1
- package/assets/index.d.ts +0 -4
- package/assets/index.js +0 -11
- package/assets/scripts/asset-scripts/champion.js +0 -10
- package/assets/scripts/asset-scripts/generate-all.d.ts +0 -4
- package/assets/scripts/asset-scripts/generate-all.js +0 -4
- package/assets/scripts/asset-scripts/item.d.ts +0 -1
- package/assets/scripts/asset-scripts/item.js +0 -10
- package/assets/scripts/asset-scripts/runes-reforged.d.ts +0 -1
- package/assets/scripts/asset-scripts/runes-reforged.js +0 -10
- package/assets/scripts/asset-scripts/summoner.d.ts +0 -1
- package/assets/scripts/asset-scripts/summoner.js +0 -10
- package/assets/scripts/constants/RuneIdComment.d.ts +0 -1
- package/assets/scripts/constants/RuneIdComment.js +0 -24
- package/assets/scripts/generate-all.d.ts +0 -23
- package/assets/scripts/generate-all.js +0 -27
- package/assets/scripts/generate-categorized-item-keys-num.d.ts +0 -1
- package/assets/scripts/generate-categorized-item-keys-num.js +0 -57
- package/assets/scripts/generate-categorized-item-keys.d.ts +0 -1
- package/assets/scripts/generate-categorized-item-keys.js +0 -59
- package/assets/scripts/generate-categorized-item-names.d.ts +0 -1
- package/assets/scripts/generate-categorized-item-names.js +0 -56
- package/assets/scripts/generate-champion-ids-by-name.d.ts +0 -1
- package/assets/scripts/generate-champion-ids-by-name.js +0 -17
- package/assets/scripts/generate-champion-ids.d.ts +0 -1
- package/assets/scripts/generate-champion-ids.js +0 -18
- package/assets/scripts/generate-champion-keys-num.d.ts +0 -1
- package/assets/scripts/generate-champion-keys-num.js +0 -20
- package/assets/scripts/generate-champion-keys.d.ts +0 -1
- package/assets/scripts/generate-champion-keys.js +0 -18
- package/assets/scripts/generate-champion-names.d.ts +0 -1
- package/assets/scripts/generate-champion-names.js +0 -18
- package/assets/scripts/generate-item-keys-num.d.ts +0 -1
- package/assets/scripts/generate-item-keys-num.js +0 -24
- package/assets/scripts/generate-item-keys.d.ts +0 -1
- package/assets/scripts/generate-item-keys.js +0 -22
- package/assets/scripts/generate-item-names.d.ts +0 -1
- package/assets/scripts/generate-item-names.js +0 -22
- package/assets/scripts/generate-non-stat-rune-ids-num.d.ts +0 -1
- package/assets/scripts/generate-non-stat-rune-ids-num.js +0 -21
- package/assets/scripts/generate-non-stat-rune-ids.d.ts +0 -1
- package/assets/scripts/generate-non-stat-rune-ids.js +0 -22
- package/assets/scripts/generate-non-stat-rune-names.d.ts +0 -1
- package/assets/scripts/generate-non-stat-rune-names.js +0 -20
- package/assets/scripts/generate-rune-ids.d.ts +0 -1
- package/assets/scripts/generate-rune-ids.js +0 -27
- package/assets/scripts/generate-rune-names.d.ts +0 -1
- package/assets/scripts/generate-rune-names.js +0 -25
- package/assets/scripts/generate-rune-picking-relationships.d.ts +0 -1
- package/assets/scripts/generate-rune-picking-relationships.js +0 -52
- package/assets/scripts/generate-rune-sets-by-rune-names-num.d.ts +0 -1
- package/assets/scripts/generate-rune-sets-by-rune-names-num.js +0 -121
- package/assets/scripts/generate-rune-sets-by-rune-names.d.ts +0 -1
- package/assets/scripts/generate-rune-sets-by-rune-names.js +0 -119
- package/assets/scripts/generate-rune-sets.d.ts +0 -1
- package/assets/scripts/generate-rune-sets.js +0 -116
- package/assets/scripts/generate-spell-ids-by-name.d.ts +0 -1
- package/assets/scripts/generate-spell-ids-by-name.js +0 -17
- package/assets/scripts/generate-spell-ids.d.ts +0 -1
- package/assets/scripts/generate-spell-ids.js +0 -18
- package/assets/scripts/generate-spell-keys-num.d.ts +0 -1
- package/assets/scripts/generate-spell-keys-num.js +0 -20
- package/assets/scripts/generate-spell-keys.d.ts +0 -1
- package/assets/scripts/generate-spell-keys.js +0 -18
- package/assets/scripts/generate-spell-names.d.ts +0 -1
- package/assets/scripts/generate-spell-names.js +0 -18
- package/assets/scripts/generate-stat-rune-ids.d.ts +0 -1
- package/assets/scripts/generate-stat-rune-ids.js +0 -18
- package/assets/scripts/generate-stat-rune-names.d.ts +0 -1
- package/assets/scripts/generate-stat-rune-names.js +0 -16
- package/assets/scripts/helpers/enableEscapedValues.d.ts +0 -15
- package/assets/scripts/helpers/enableEscapedValues.js +0 -34
- package/assets/scripts/helpers/generateIndexFile.d.ts +0 -1
- package/assets/scripts/helpers/generateIndexFile.js +0 -3
- package/assets/scripts/helpers/getExportStatement.d.ts +0 -6
- package/assets/scripts/helpers/getExportStatement.js +0 -37
- package/assets/scripts/helpers/getFmtdComment.d.ts +0 -5
- package/assets/scripts/helpers/getFmtdComment.js +0 -11
- package/assets/scripts/helpers/validateNumber.d.ts +0 -1
- package/assets/scripts/helpers/validateNumber.js +0 -6
- package/assets/scripts/helpers/writeToTmpFile.d.ts +0 -13
- package/assets/scripts/helpers/writeToTmpFile.js +0 -18
- package/assets/scripts/print-file-names.d.ts +0 -1
- package/assets/scripts/print-file-names.js +0 -89
- package/core/Locale.d.ts +0 -2
- package/core/PatchVersion.d.ts +0 -1
- package/core/PatchVersion.js +0 -1
- package/core/constants/Abilities.d.ts +0 -17
- package/core/constants/Abilities.js +0 -19
- package/core/constants/BuildingTypes.d.ts +0 -6
- package/core/constants/BuildingTypes.js +0 -7
- package/core/constants/Champions/ChampionIds.d.ts +0 -171
- package/core/constants/Champions/ChampionIds.js +0 -1
- package/core/constants/Champions/ChampionIdsByName.d.ts +0 -170
- package/core/constants/Champions/ChampionIdsByName.js +0 -1
- package/core/constants/Champions/ChampionKeys.d.ts +0 -171
- package/core/constants/Champions/ChampionKeys.js +0 -1
- package/core/constants/Champions/ChampionKeysNum.d.ts +0 -171
- package/core/constants/Champions/ChampionKeysNum.js +0 -1
- package/core/constants/Champions/ChampionNames.d.ts +0 -171
- package/core/constants/Champions/ChampionNames.js +0 -1
- package/core/constants/Continents.d.ts +0 -8
- package/core/constants/Continents.js +0 -9
- package/core/constants/DataDragonUrls.d.ts +0 -52
- package/core/constants/DataDragonUrls.js +0 -58
- package/core/constants/DragonTypes.d.ts +0 -11
- package/core/constants/DragonTypes.js +0 -12
- package/core/constants/GameModes.d.ts +0 -12
- package/core/constants/GameModes.js +0 -13
- package/core/constants/GameTypes.d.ts +0 -7
- package/core/constants/GameTypes.js +0 -8
- package/core/constants/Items/BootsItemKeys.d.ts +0 -14
- package/core/constants/Items/BootsItemKeys.js +0 -1
- package/core/constants/Items/BootsItemKeysNum.d.ts +0 -14
- package/core/constants/Items/BootsItemKeysNum.js +0 -1
- package/core/constants/Items/BootsItemNames.d.ts +0 -14
- package/core/constants/Items/BootsItemNames.js +0 -1
- package/core/constants/Items/ItemKeys.d.ts +0 -238
- package/core/constants/Items/ItemKeys.js +0 -1
- package/core/constants/Items/ItemKeysNum.d.ts +0 -238
- package/core/constants/Items/ItemKeysNum.js +0 -1
- package/core/constants/Items/ItemNames.d.ts +0 -244
- package/core/constants/Items/ItemNames.js +0 -1
- package/core/constants/Items/ItemTypes.d.ts +0 -7
- package/core/constants/Items/ItemTypes.js +0 -8
- package/core/constants/Items/LegendaryItemKeys.d.ts +0 -112
- package/core/constants/Items/LegendaryItemKeys.js +0 -1
- package/core/constants/Items/LegendaryItemKeysNum.d.ts +0 -112
- package/core/constants/Items/LegendaryItemKeysNum.js +0 -1
- package/core/constants/Items/LegendaryItemNames.d.ts +0 -112
- package/core/constants/Items/LegendaryItemNames.js +0 -1
- package/core/constants/KillTypes.d.ts +0 -7
- package/core/constants/KillTypes.js +0 -8
- package/core/constants/LaneTypes.d.ts +0 -7
- package/core/constants/LaneTypes.js +0 -8
- package/core/constants/Lanes.d.ts +0 -8
- package/core/constants/Lanes.js +0 -9
- package/core/constants/LeagueTexts.d.ts +0 -49
- package/core/constants/LeagueTexts.js +0 -54
- package/core/constants/Levels.d.ts +0 -22
- package/core/constants/Levels.js +0 -23
- package/core/constants/MapIds.d.ts +0 -17
- package/core/constants/MapIds.js +0 -18
- package/core/constants/MonsterTypes.d.ts +0 -8
- package/core/constants/MonsterTypes.js +0 -9
- package/core/constants/ParticipantIds.d.ts +0 -14
- package/core/constants/ParticipantIds.js +0 -15
- package/core/constants/PlatformApiUris.d.ts +0 -20
- package/core/constants/PlatformApiUris.js +0 -21
- package/core/constants/PlatformIds.d.ts +0 -23
- package/core/constants/PlatformIds.js +0 -26
- package/core/constants/Positions.d.ts +0 -9
- package/core/constants/Positions.js +0 -10
- package/core/constants/QueueIds.d.ts +0 -114
- package/core/constants/QueueIds.js +0 -140
- package/core/constants/QueueTypes.d.ts +0 -7
- package/core/constants/QueueTypes.js +0 -8
- package/core/constants/RankedRanks.d.ts +0 -8
- package/core/constants/RankedRanks.js +0 -9
- package/core/constants/RegionalApiUris.d.ts +0 -8
- package/core/constants/RegionalApiUris.js +0 -9
- package/core/constants/Regions.d.ts +0 -23
- package/core/constants/Regions.js +0 -26
- package/core/constants/RelativeTeams.d.ts +0 -6
- package/core/constants/RelativeTeams.js +0 -7
- package/core/constants/Roles.d.ts +0 -8
- package/core/constants/Roles.js +0 -9
- package/core/constants/Runes/NonStatRuneIds.d.ts +0 -85
- package/core/constants/Runes/NonStatRuneIds.js +0 -1
- package/core/constants/Runes/NonStatRuneIdsNum.d.ts +0 -63
- package/core/constants/Runes/NonStatRuneIdsNum.js +0 -1
- package/core/constants/Runes/NonStatRuneNames.d.ts +0 -63
- package/core/constants/Runes/NonStatRuneNames.js +0 -1
- package/core/constants/Runes/RuneIconFileNames.d.ts +0 -14
- package/core/constants/Runes/RuneIconFileNames.js +0 -97
- package/core/constants/Runes/RunePickingRelationships.d.ts +0 -74
- package/core/constants/Runes/RunePickingRelationships.js +0 -4
- package/core/constants/Runes/RuneSets.d.ts +0 -721
- package/core/constants/Runes/RuneSets.js +0 -11
- package/core/constants/Runes/RuneSetsByRuneNames.d.ts +0 -765
- package/core/constants/Runes/RuneSetsByRuneNames.js +0 -11
- package/core/constants/Runes/RuneSetsByRuneNamesNum.d.ts +0 -765
- package/core/constants/Runes/RuneSetsByRuneNamesNum.js +0 -11
- package/core/constants/Runes/RuneTreeIds.d.ts +0 -11
- package/core/constants/Runes/RuneTreeIds.js +0 -14
- package/core/constants/Runes/RuneTreeIdsNum.d.ts +0 -11
- package/core/constants/Runes/RuneTreeIdsNum.js +0 -14
- package/core/constants/Runes/RuneTreeNames.d.ts +0 -11
- package/core/constants/Runes/RuneTreeNames.js +0 -14
- package/core/constants/Runes/RuneTreeTypes.d.ts +0 -6
- package/core/constants/Runes/RuneTreeTypes.js +0 -7
- package/core/constants/SkillSlots.d.ts +0 -8
- package/core/constants/SkillSlots.js +0 -9
- package/core/constants/Skills.d.ts +0 -8
- package/core/constants/Skills.js +0 -9
- package/core/constants/Spells/SpellIds.d.ts +0 -21
- package/core/constants/Spells/SpellIds.js +0 -1
- package/core/constants/Spells/SpellIdsByName.d.ts +0 -18
- package/core/constants/Spells/SpellIdsByName.js +0 -1
- package/core/constants/Spells/SpellKeys.d.ts +0 -21
- package/core/constants/Spells/SpellKeys.js +0 -1
- package/core/constants/Spells/SpellKeysNum.d.ts +0 -21
- package/core/constants/Spells/SpellKeysNum.js +0 -1
- package/core/constants/Spells/SpellNames.d.ts +0 -21
- package/core/constants/Spells/SpellNames.js +0 -1
- package/core/constants/TeamIds.d.ts +0 -6
- package/core/constants/TeamIds.js +0 -7
- package/core/constants/TowerTypes.d.ts +0 -8
- package/core/constants/TowerTypes.js +0 -9
- package/core/constants/WardTypes.d.ts +0 -9
- package/core/constants/WardTypes.js +0 -10
- package/core/helpers/Champions/getChampionIdByKey.d.ts +0 -4
- package/core/helpers/Champions/getChampionIdByKey.js +0 -4
- package/core/helpers/Champions/getChampionIdByName.d.ts +0 -3
- package/core/helpers/Champions/getChampionIdByName.js +0 -4
- package/core/helpers/Champions/getChampionKeyById.d.ts +0 -3
- package/core/helpers/Champions/getChampionKeyById.js +0 -4
- package/core/helpers/Champions/getChampionKeyByName.d.ts +0 -3
- package/core/helpers/Champions/getChampionKeyByName.js +0 -5
- package/core/helpers/Champions/getChampionNameById.d.ts +0 -3
- package/core/helpers/Champions/getChampionNameById.js +0 -5
- package/core/helpers/Champions/getChampionNameByKey.d.ts +0 -4
- package/core/helpers/Champions/getChampionNameByKey.js +0 -4
- package/core/helpers/Champions/isChampionId.d.ts +0 -2
- package/core/helpers/Champions/isChampionId.js +0 -4
- package/core/helpers/Champions/isChampionKey.d.ts +0 -2
- package/core/helpers/Champions/isChampionKey.js +0 -4
- package/core/helpers/Champions/isChampionKeyNum.d.ts +0 -2
- package/core/helpers/Champions/isChampionKeyNum.js +0 -4
- package/core/helpers/Champions/isChampionName.d.ts +0 -2
- package/core/helpers/Champions/isChampionName.js +0 -4
- package/core/helpers/Items/getItemKeyByName.d.ts +0 -3
- package/core/helpers/Items/getItemKeyByName.js +0 -4
- package/core/helpers/Items/getItemKeyNumByName.d.ts +0 -3
- package/core/helpers/Items/getItemKeyNumByName.js +0 -4
- package/core/helpers/Items/getItemNameByKey.d.ts +0 -4
- package/core/helpers/Items/getItemNameByKey.js +0 -4
- package/core/helpers/Items/isBootsItemKey.d.ts +0 -2
- package/core/helpers/Items/isBootsItemKey.js +0 -4
- package/core/helpers/Items/isBootsItemKeyNum.d.ts +0 -2
- package/core/helpers/Items/isBootsItemKeyNum.js +0 -4
- package/core/helpers/Items/isBootsItemName.d.ts +0 -2
- package/core/helpers/Items/isBootsItemName.js +0 -4
- package/core/helpers/Items/isItemKey.d.ts +0 -2
- package/core/helpers/Items/isItemKey.js +0 -4
- package/core/helpers/Items/isItemKeyNum.d.ts +0 -2
- package/core/helpers/Items/isItemKeyNum.js +0 -4
- package/core/helpers/Items/isItemName.d.ts +0 -2
- package/core/helpers/Items/isItemName.js +0 -4
- package/core/helpers/Items/isLegendaryItemKey.d.ts +0 -2
- package/core/helpers/Items/isLegendaryItemKey.js +0 -4
- package/core/helpers/Items/isLegendaryItemKeyNum.d.ts +0 -2
- package/core/helpers/Items/isLegendaryItemKeyNum.js +0 -4
- package/core/helpers/Items/isLegendaryItemName.d.ts +0 -2
- package/core/helpers/Items/isLegendaryItemName.js +0 -4
- package/core/helpers/Items/isTier2Boots.d.ts +0 -3
- package/core/helpers/Items/isTier2Boots.js +0 -9
- package/core/helpers/Runes/getNonStatRuneIdByName.d.ts +0 -3
- package/core/helpers/Runes/getNonStatRuneIdByName.js +0 -4
- package/core/helpers/Runes/getNonStatRuneNameById.d.ts +0 -3
- package/core/helpers/Runes/getNonStatRuneNameById.js +0 -4
- package/core/helpers/Runes/getRuneCategoryName.d.ts +0 -4
- package/core/helpers/Runes/getRuneCategoryName.js +0 -16
- package/core/helpers/Runes/getRuneCdnUrl.d.ts +0 -3
- package/core/helpers/Runes/getRuneCdnUrl.js +0 -50
- package/core/helpers/Runes/getRuneIdByName.d.ts +0 -3
- package/core/helpers/Runes/getRuneIdByName.js +0 -4
- package/core/helpers/Runes/getRuneNameById.d.ts +0 -3
- package/core/helpers/Runes/getRuneNameById.js +0 -4
- package/core/helpers/Runes/getStatRuneIdByName.d.ts +0 -3
- package/core/helpers/Runes/getStatRuneIdByName.js +0 -4
- package/core/helpers/Runes/getStatRuneNameById.d.ts +0 -3
- package/core/helpers/Runes/getStatRuneNameById.js +0 -4
- package/core/helpers/Runes/isDominationRuneId.d.ts +0 -2
- package/core/helpers/Runes/isDominationRuneId.js +0 -4
- package/core/helpers/Runes/isDominationRuneIdNum.d.ts +0 -2
- package/core/helpers/Runes/isDominationRuneIdNum.js +0 -4
- package/core/helpers/Runes/isDominationRuneName.d.ts +0 -2
- package/core/helpers/Runes/isDominationRuneName.js +0 -4
- package/core/helpers/Runes/isInspirationRuneId.d.ts +0 -2
- package/core/helpers/Runes/isInspirationRuneId.js +0 -4
- package/core/helpers/Runes/isInspirationRuneIdNum.d.ts +0 -2
- package/core/helpers/Runes/isInspirationRuneIdNum.js +0 -4
- package/core/helpers/Runes/isInspirationRuneName.d.ts +0 -2
- package/core/helpers/Runes/isInspirationRuneName.js +0 -4
- package/core/helpers/Runes/isKeystoneRuneId.d.ts +0 -2
- package/core/helpers/Runes/isKeystoneRuneId.js +0 -4
- package/core/helpers/Runes/isKeystoneRuneIdNum.d.ts +0 -2
- package/core/helpers/Runes/isKeystoneRuneIdNum.js +0 -4
- package/core/helpers/Runes/isKeystoneRuneName.d.ts +0 -2
- package/core/helpers/Runes/isKeystoneRuneName.js +0 -4
- package/core/helpers/Runes/isNonStatRuneId.d.ts +0 -2
- package/core/helpers/Runes/isNonStatRuneId.js +0 -4
- package/core/helpers/Runes/isNonStatRuneIdNum.d.ts +0 -2
- package/core/helpers/Runes/isNonStatRuneIdNum.js +0 -4
- package/core/helpers/Runes/isNonStatRuneName.d.ts +0 -2
- package/core/helpers/Runes/isNonStatRuneName.js +0 -4
- package/core/helpers/Runes/isPrecisionRuneId.d.ts +0 -2
- package/core/helpers/Runes/isPrecisionRuneId.js +0 -4
- package/core/helpers/Runes/isPrecisionRuneIdNum.d.ts +0 -2
- package/core/helpers/Runes/isPrecisionRuneIdNum.js +0 -4
- package/core/helpers/Runes/isPrecisionRuneName.d.ts +0 -2
- package/core/helpers/Runes/isPrecisionRuneName.js +0 -4
- package/core/helpers/Runes/isResolveRuneId.d.ts +0 -2
- package/core/helpers/Runes/isResolveRuneId.js +0 -4
- package/core/helpers/Runes/isResolveRuneIdNum.d.ts +0 -2
- package/core/helpers/Runes/isResolveRuneIdNum.js +0 -4
- package/core/helpers/Runes/isResolveRuneName.d.ts +0 -2
- package/core/helpers/Runes/isResolveRuneName.js +0 -4
- package/core/helpers/Runes/isRuneId.d.ts +0 -2
- package/core/helpers/Runes/isRuneId.js +0 -4
- package/core/helpers/Runes/isRuneIdNum.d.ts +0 -2
- package/core/helpers/Runes/isRuneIdNum.js +0 -4
- package/core/helpers/Runes/isRuneName.d.ts +0 -2
- package/core/helpers/Runes/isRuneName.js +0 -4
- package/core/helpers/Runes/isSorceryRuneId.d.ts +0 -2
- package/core/helpers/Runes/isSorceryRuneId.js +0 -4
- package/core/helpers/Runes/isSorceryRuneIdNum.d.ts +0 -2
- package/core/helpers/Runes/isSorceryRuneIdNum.js +0 -4
- package/core/helpers/Runes/isSorceryRuneName.d.ts +0 -2
- package/core/helpers/Runes/isSorceryRuneName.js +0 -4
- package/core/helpers/Runes/isStatRuneId.d.ts +0 -2
- package/core/helpers/Runes/isStatRuneId.js +0 -4
- package/core/helpers/Runes/isStatRuneIdNum.d.ts +0 -2
- package/core/helpers/Runes/isStatRuneIdNum.js +0 -4
- package/core/helpers/Runes/isStatRuneName.d.ts +0 -2
- package/core/helpers/Runes/isStatRuneName.js +0 -4
- package/core/helpers/Spells/getSpellIdByKey.d.ts +0 -4
- package/core/helpers/Spells/getSpellIdByKey.js +0 -4
- package/core/helpers/Spells/getSpellIdByName.d.ts +0 -3
- package/core/helpers/Spells/getSpellIdByName.js +0 -4
- package/core/helpers/Spells/getSpellKeyById.d.ts +0 -3
- package/core/helpers/Spells/getSpellKeyById.js +0 -4
- package/core/helpers/Spells/getSpellKeyByName.d.ts +0 -3
- package/core/helpers/Spells/getSpellKeyByName.js +0 -5
- package/core/helpers/Spells/getSpellNameById.d.ts +0 -3
- package/core/helpers/Spells/getSpellNameById.js +0 -5
- package/core/helpers/Spells/getSpellNameByKey.d.ts +0 -4
- package/core/helpers/Spells/getSpellNameByKey.js +0 -4
- package/core/helpers/Spells/isSpellId.d.ts +0 -2
- package/core/helpers/Spells/isSpellId.js +0 -4
- package/core/helpers/Spells/isSpellKey.d.ts +0 -2
- package/core/helpers/Spells/isSpellKey.js +0 -4
- package/core/helpers/Spells/isSpellKeyNum.d.ts +0 -2
- package/core/helpers/Spells/isSpellKeyNum.js +0 -4
- package/core/helpers/Spells/isSpellName.d.ts +0 -2
- package/core/helpers/Spells/isSpellName.js +0 -4
- package/core/helpers/getPositionImageUrl.d.ts +0 -2
- package/core/helpers/getPositionImageUrl.js +0 -11
- package/core/helpers/isRiotId.d.ts +0 -5
- package/core/helpers/isRiotId.js +0 -15
- package/core/helpers/makeRiotId.d.ts +0 -4
- package/core/helpers/makeRiotId.js +0 -5
- package/core/helpers/splitRiotId.d.ts +0 -10
- package/core/helpers/splitRiotId.js +0 -16
- package/core/index.d.ts +0 -139
- package/core/index.js +0 -150
- package/core/types/championJson.d.ts +0 -85
- package/core/types/championJson.js +0 -1
- package/core/types/interfaces.d.ts +0 -22
- package/core/types/interfaces.js +0 -1
- package/core/types/types.d.ts +0 -268
- package/core/types/types.js +0 -1
- /package/{core → dist}/Locale.js +0 -0
- /package/{assets/scripts/asset-scripts/champion.d.ts → dist/helpers/type.js} +0 -0
@@ -0,0 +1,39 @@
|
|
1
|
+
import { ItemId, ItemName, Items, ItemsArr } from '../objects/generated/Items';
|
2
|
+
import { MapId } from '../objects/Maps';
|
3
|
+
/**
|
4
|
+
* Get an item by its **id** or **name**.
|
5
|
+
*
|
6
|
+
* Item categorization is focused on Summoner's Rift. Item's `srType` field denotes:
|
7
|
+
* - `0`: Starter items (Summoner's Rift)
|
8
|
+
* - `1`: Basic items (Summoner's Rift)
|
9
|
+
* - `2`: Epic items (Summoner's Rift)
|
10
|
+
* - `3`: Legendary items (Summoner's Rift)
|
11
|
+
* - `11`: Trinkets (Summoner's Rift)
|
12
|
+
* - `12`: Boots (Summoner's Rift)
|
13
|
+
* - `13`: Consumables (Summoner's Rift)
|
14
|
+
* - `-1`: Misc. & Uncategorized (Summoner's Rift & other maps)
|
15
|
+
*
|
16
|
+
* ---
|
17
|
+
* Second argument `mapId` only applies to getting an item by its **name**:
|
18
|
+
*
|
19
|
+
* Since there can be duplicate item names intended for different maps,
|
20
|
+
* `mapId` denotes which map should be prioritized.
|
21
|
+
* Function may still return an item for a provided `itemName`
|
22
|
+
* even if it does not match the provided `mapId`.
|
23
|
+
*
|
24
|
+
* Defaults to `11` (Summoner's Rift).
|
25
|
+
*
|
26
|
+
* Use `lol.item.isAvailable` to determine whether item is available on a certain map.
|
27
|
+
*/
|
28
|
+
export declare function getItem(id_name: ItemId | ItemName, mapId?: MapId): typeof Items[keyof typeof Items];
|
29
|
+
export declare function isStarterItem(item_id_name: typeof ItemsArr[number] | ItemId | ItemName): boolean;
|
30
|
+
export declare function isBasicItem(item_id_name: typeof ItemsArr[number] | ItemId | ItemName): boolean;
|
31
|
+
export declare function isEpicItem(item_id_name: typeof ItemsArr[number] | ItemId | ItemName): boolean;
|
32
|
+
export declare function isLegendaryItem(item_id_name: typeof ItemsArr[number] | ItemId | ItemName): boolean;
|
33
|
+
export declare function isTrinketItem(item_id_name: typeof ItemsArr[number] | ItemId | ItemName): boolean;
|
34
|
+
export declare function isBootsItem(item_id_name: typeof ItemsArr[number] | ItemId | ItemName): boolean;
|
35
|
+
export declare function isConsumableItem(item_id_name: typeof ItemsArr[number] | ItemId | ItemName): boolean;
|
36
|
+
/** Check whether item is available on a certain map. */
|
37
|
+
export declare function isItemAvailableOnMap(itemId: ItemId, mapId: MapId): boolean;
|
38
|
+
export declare function isItemId(id: number | null | undefined): id is ItemId;
|
39
|
+
export declare function isItemName(name: string | null | undefined): name is ItemName;
|
@@ -0,0 +1,113 @@
|
|
1
|
+
import { ItemSrTypes } from '../enums/ItemSrTypes';
|
2
|
+
import { bootsItemIds, itemNames, Items, } from '../objects/generated/Items';
|
3
|
+
import { MapsArr } from '../objects/Maps';
|
4
|
+
/**
|
5
|
+
* Get an item by its **id** or **name**.
|
6
|
+
*
|
7
|
+
* Item categorization is focused on Summoner's Rift. Item's `srType` field denotes:
|
8
|
+
* - `0`: Starter items (Summoner's Rift)
|
9
|
+
* - `1`: Basic items (Summoner's Rift)
|
10
|
+
* - `2`: Epic items (Summoner's Rift)
|
11
|
+
* - `3`: Legendary items (Summoner's Rift)
|
12
|
+
* - `11`: Trinkets (Summoner's Rift)
|
13
|
+
* - `12`: Boots (Summoner's Rift)
|
14
|
+
* - `13`: Consumables (Summoner's Rift)
|
15
|
+
* - `-1`: Misc. & Uncategorized (Summoner's Rift & other maps)
|
16
|
+
*
|
17
|
+
* ---
|
18
|
+
* Second argument `mapId` only applies to getting an item by its **name**:
|
19
|
+
*
|
20
|
+
* Since there can be duplicate item names intended for different maps,
|
21
|
+
* `mapId` denotes which map should be prioritized.
|
22
|
+
* Function may still return an item for a provided `itemName`
|
23
|
+
* even if it does not match the provided `mapId`.
|
24
|
+
*
|
25
|
+
* Defaults to `11` (Summoner's Rift).
|
26
|
+
*
|
27
|
+
* Use `lol.item.isAvailable` to determine whether item is available on a certain map.
|
28
|
+
*/
|
29
|
+
export function getItem(id_name, mapId = 11) {
|
30
|
+
if (typeof id_name == 'number')
|
31
|
+
return Items[id_name];
|
32
|
+
return Items[getItemIdByName(id_name, mapId)];
|
33
|
+
}
|
34
|
+
/** @see `getItem` */
|
35
|
+
function getItemIdByName(itemName, mapId = 11) {
|
36
|
+
const itemIdOrMaps = itemNames[itemName];
|
37
|
+
if (typeof itemIdOrMaps == 'number') {
|
38
|
+
const itemId = itemIdOrMaps;
|
39
|
+
return itemId;
|
40
|
+
}
|
41
|
+
else {
|
42
|
+
const maps = itemIdOrMaps;
|
43
|
+
const itemId = maps[mapId];
|
44
|
+
if (itemId != null) {
|
45
|
+
return itemId;
|
46
|
+
}
|
47
|
+
else {
|
48
|
+
// Take another map, at least. In order: Summoner's Rift, Howling Abyss, Arena etc.
|
49
|
+
let itemId;
|
50
|
+
if (itemId = maps[11])
|
51
|
+
return itemId;
|
52
|
+
if (itemId = maps[12])
|
53
|
+
return itemId;
|
54
|
+
if (itemId = maps[30])
|
55
|
+
return itemId;
|
56
|
+
for (const { id } of MapsArr) {
|
57
|
+
if (itemId = maps[id])
|
58
|
+
return itemId;
|
59
|
+
}
|
60
|
+
return 2003; // If all else fails, return a health potion (though generated files by design should not reach this)
|
61
|
+
}
|
62
|
+
}
|
63
|
+
}
|
64
|
+
export function isStarterItem(item_id_name) {
|
65
|
+
if (typeof item_id_name == 'object')
|
66
|
+
return item_id_name.srType == ItemSrTypes.STARTER;
|
67
|
+
return getItem(item_id_name).srType == ItemSrTypes.STARTER;
|
68
|
+
}
|
69
|
+
export function isBasicItem(item_id_name) {
|
70
|
+
if (typeof item_id_name == 'object')
|
71
|
+
return item_id_name.srType == ItemSrTypes.BASIC;
|
72
|
+
return getItem(item_id_name).srType == ItemSrTypes.BASIC;
|
73
|
+
}
|
74
|
+
export function isEpicItem(item_id_name) {
|
75
|
+
if (typeof item_id_name == 'object')
|
76
|
+
return item_id_name.srType == ItemSrTypes.EPIC;
|
77
|
+
return getItem(item_id_name).srType == ItemSrTypes.EPIC;
|
78
|
+
}
|
79
|
+
export function isLegendaryItem(item_id_name) {
|
80
|
+
if (typeof item_id_name == 'object')
|
81
|
+
return item_id_name.srType == ItemSrTypes.LEGENDARY;
|
82
|
+
return getItem(item_id_name).srType == ItemSrTypes.LEGENDARY;
|
83
|
+
}
|
84
|
+
export function isTrinketItem(item_id_name) {
|
85
|
+
if (typeof item_id_name == 'object')
|
86
|
+
return item_id_name.srType == ItemSrTypes.TRINKET;
|
87
|
+
return getItem(item_id_name).srType == ItemSrTypes.TRINKET;
|
88
|
+
}
|
89
|
+
export function isBootsItem(item_id_name) {
|
90
|
+
if (typeof item_id_name == 'object')
|
91
|
+
return item_id_name.id in bootsItemIds;
|
92
|
+
if (typeof item_id_name == 'number')
|
93
|
+
return item_id_name in bootsItemIds;
|
94
|
+
return getItemIdByName(item_id_name) in bootsItemIds;
|
95
|
+
}
|
96
|
+
export function isConsumableItem(item_id_name) {
|
97
|
+
if (typeof item_id_name == 'object')
|
98
|
+
return item_id_name.srType == ItemSrTypes.CONSUMABLE;
|
99
|
+
return getItem(item_id_name).srType == ItemSrTypes.CONSUMABLE;
|
100
|
+
}
|
101
|
+
/** Check whether item is available on a certain map. */
|
102
|
+
export function isItemAvailableOnMap(itemId, mapId) {
|
103
|
+
const mapsObjOrItemId = itemNames[Items[itemId].name];
|
104
|
+
if (typeof mapsObjOrItemId == 'number')
|
105
|
+
return false; // Means item is disabled on all maps
|
106
|
+
return mapId in mapsObjOrItemId;
|
107
|
+
}
|
108
|
+
export function isItemId(id) {
|
109
|
+
return typeof id == 'number' && id in Items;
|
110
|
+
}
|
111
|
+
export function isItemName(name) {
|
112
|
+
return typeof name == 'string' && name in itemNames;
|
113
|
+
}
|
@@ -0,0 +1,16 @@
|
|
1
|
+
/** E.g. `Faker#T1` ⇒ `{name: 'Faker', tag: 'T1'}` */
|
2
|
+
export declare function splitRiotId(riotId: string,
|
3
|
+
/** @default '#' */
|
4
|
+
splitChar?: string): RiotId;
|
5
|
+
/** Default `splitChar` is "#". */
|
6
|
+
export declare function makeRiotId(riotId: RiotId,
|
7
|
+
/** @default '#' */
|
8
|
+
splitChar?: string): string;
|
9
|
+
/** Default `splitChar` is "#". */
|
10
|
+
export declare function validateRiotId(riotId: string,
|
11
|
+
/** @default '#' */
|
12
|
+
splitChar?: string): boolean;
|
13
|
+
export type RiotId = {
|
14
|
+
name: string;
|
15
|
+
tag: string;
|
16
|
+
};
|
@@ -0,0 +1,34 @@
|
|
1
|
+
const maxRiotGameNameCharCount = 16;
|
2
|
+
const maxRiotTaglineCharCount = 5;
|
3
|
+
/** E.g. `Faker#T1` ⇒ `{name: 'Faker', tag: 'T1'}` */
|
4
|
+
export function splitRiotId(riotId,
|
5
|
+
/** @default '#' */
|
6
|
+
splitChar = '#') {
|
7
|
+
var _a, _b;
|
8
|
+
const split = riotId.split(splitChar);
|
9
|
+
let name = (_a = split[0]) !== null && _a !== void 0 ? _a : '';
|
10
|
+
let tag = (_b = split[1]) !== null && _b !== void 0 ? _b : '';
|
11
|
+
if (tag.includes(splitChar))
|
12
|
+
tag = '';
|
13
|
+
return {
|
14
|
+
name,
|
15
|
+
tag,
|
16
|
+
};
|
17
|
+
}
|
18
|
+
/** Default `splitChar` is "#". */
|
19
|
+
export function makeRiotId(riotId,
|
20
|
+
/** @default '#' */
|
21
|
+
splitChar = '#') {
|
22
|
+
return riotId.name + splitChar + riotId.tag;
|
23
|
+
}
|
24
|
+
/** Default `splitChar` is "#". */
|
25
|
+
export function validateRiotId(riotId,
|
26
|
+
/** @default '#' */
|
27
|
+
splitChar = '#') {
|
28
|
+
const id = splitRiotId(riotId, splitChar);
|
29
|
+
if (id.name == '' || id.name.length > maxRiotGameNameCharCount)
|
30
|
+
return false;
|
31
|
+
if (id.tag == '' || id.tag.length > maxRiotTaglineCharCount)
|
32
|
+
return false;
|
33
|
+
return true;
|
34
|
+
}
|
@@ -0,0 +1,36 @@
|
|
1
|
+
import { RuneId, RuneKey, RuneName, RuneTreeId, RuneTreeKey, RuneTreeName, RuneTrees, Runes, StatRuneId, StatRuneName, StatRunes, StatRunesInSlot, StatRunesInSlotArr, statRuneNames } from '../objects/generated/Runes';
|
2
|
+
import { MergeKeys } from './type';
|
3
|
+
/** Get a rune by its **id**, **key**, or **name**. */
|
4
|
+
export declare function getRune(id_key_name: RuneId | RuneKey | RuneName): typeof Runes[keyof typeof Runes];
|
5
|
+
type StatRune = MergeKeys<typeof StatRunes[keyof typeof StatRunes]>;
|
6
|
+
type StatRuneInSlot = MergeKeys<typeof StatRunesInSlotArr[number]>;
|
7
|
+
type SlotOfStatRune<T> = T extends StatRuneId ? keyof typeof StatRunesInSlot[T] : T extends StatRuneName ? keyof typeof StatRunesInSlot[typeof statRuneNames[T]] : undefined;
|
8
|
+
/**
|
9
|
+
* Get a stat rune by its **id** or **name**.
|
10
|
+
*
|
11
|
+
* ---
|
12
|
+
* Optionally, receive a `horizontal` and `slot` property in the stat rune object
|
13
|
+
* by providing a value for the secondary function parameter `slot`.
|
14
|
+
* `horizontal` provides ids of other stat runes that are in the same row as gotten stat rune.
|
15
|
+
*/
|
16
|
+
export declare function getStatRune(id_name: StatRuneId | StatRuneName): StatRune;
|
17
|
+
/**
|
18
|
+
* Get a stat rune by its **id** or **name**.
|
19
|
+
*
|
20
|
+
* ---
|
21
|
+
* Optionally, receive a `horizontal` and `slot` property in the stat rune object
|
22
|
+
* by providing a value for the secondary function parameter `slot`.
|
23
|
+
* `horizontal` provides ids of other stat runes that are in the same row as gotten stat rune.
|
24
|
+
*/
|
25
|
+
export declare function getStatRune<T extends StatRuneId | StatRuneName, S extends SlotOfStatRune<T>>(id_name: T, slot?: S): StatRuneInSlot;
|
26
|
+
/** Get a rune tree by its **id**, **key**, or **name**. */
|
27
|
+
export declare function getRuneTree(id_key_name: RuneTreeId | RuneTreeKey | RuneTreeName): typeof RuneTrees[keyof typeof RuneTrees];
|
28
|
+
export declare function isRuneId(id: number | null | undefined): id is RuneId;
|
29
|
+
export declare function isRuneKey(key: string | null | undefined): key is RuneKey;
|
30
|
+
export declare function isRuneName(name: string | null | undefined): name is RuneName;
|
31
|
+
export declare function isStatRuneId(id: number | null | undefined): id is StatRuneId;
|
32
|
+
export declare function isStatRuneName(name: string | null | undefined): name is StatRuneName;
|
33
|
+
export declare function isRuneTreeId(id: number | null | undefined): id is RuneTreeId;
|
34
|
+
export declare function isRuneTreeKey(key: string | null | undefined): key is RuneTreeKey;
|
35
|
+
export declare function isRuneTreeName(name: string | null | undefined): name is RuneTreeName;
|
36
|
+
export {};
|
@@ -0,0 +1,70 @@
|
|
1
|
+
import { RuneTrees, Runes, StatRunes, StatRunesInSlot, runeKeys, runeNames, runeTreeKeys, runeTreeNames, statRuneNames, } from '../objects/generated/Runes';
|
2
|
+
/** Get a rune by its **id**, **key**, or **name**. */
|
3
|
+
export function getRune(id_key_name) {
|
4
|
+
if (typeof id_key_name == 'number')
|
5
|
+
return Runes[id_key_name];
|
6
|
+
if (isRuneKey(id_key_name))
|
7
|
+
return Runes[runeKeys[id_key_name]];
|
8
|
+
return Runes[runeNames[id_key_name]];
|
9
|
+
}
|
10
|
+
export function getStatRune(id_name, slot) {
|
11
|
+
const statRuneSlot = slot;
|
12
|
+
if (typeof id_name == 'number') {
|
13
|
+
const statRuneId = id_name;
|
14
|
+
if (statRuneSlot == null) {
|
15
|
+
return StatRunes[statRuneId];
|
16
|
+
}
|
17
|
+
else {
|
18
|
+
const x = StatRunesInSlot[statRuneId];
|
19
|
+
if (statRuneSlot in StatRunesInSlot[statRuneId])
|
20
|
+
return StatRunesInSlot[statRuneId][statRuneSlot];
|
21
|
+
console.warn(`ended up with empty object while getting stat rune`);
|
22
|
+
return {}; // should not reach
|
23
|
+
}
|
24
|
+
}
|
25
|
+
else {
|
26
|
+
const statRuneName = id_name;
|
27
|
+
if (statRuneSlot == null) {
|
28
|
+
return StatRunes[statRuneNames[statRuneName]];
|
29
|
+
}
|
30
|
+
else {
|
31
|
+
const statRuneId = statRuneNames[statRuneName];
|
32
|
+
if (statRuneSlot in StatRunesInSlot[statRuneId])
|
33
|
+
return StatRunesInSlot[statRuneId][statRuneSlot];
|
34
|
+
console.warn(`ended up with empty object while getting stat rune`);
|
35
|
+
return {}; // should not reach
|
36
|
+
}
|
37
|
+
}
|
38
|
+
}
|
39
|
+
/** Get a rune tree by its **id**, **key**, or **name**. */
|
40
|
+
export function getRuneTree(id_key_name) {
|
41
|
+
if (typeof id_key_name == 'number')
|
42
|
+
return RuneTrees[id_key_name];
|
43
|
+
if (isRuneTreeKey(id_key_name))
|
44
|
+
return RuneTrees[runeTreeKeys[id_key_name]];
|
45
|
+
return RuneTrees[runeTreeNames[id_key_name]];
|
46
|
+
}
|
47
|
+
export function isRuneId(id) {
|
48
|
+
return typeof id == 'number' && id in Runes;
|
49
|
+
}
|
50
|
+
export function isRuneKey(key) {
|
51
|
+
return typeof key == 'string' && key in runeKeys;
|
52
|
+
}
|
53
|
+
export function isRuneName(name) {
|
54
|
+
return typeof name == 'string' && name in runeNames;
|
55
|
+
}
|
56
|
+
export function isStatRuneId(id) {
|
57
|
+
return typeof id == 'number' && id in StatRunes;
|
58
|
+
}
|
59
|
+
export function isStatRuneName(name) {
|
60
|
+
return typeof name == 'string' && name in statRuneNames;
|
61
|
+
}
|
62
|
+
export function isRuneTreeId(id) {
|
63
|
+
return typeof id == 'number' && id in RuneTrees;
|
64
|
+
}
|
65
|
+
export function isRuneTreeKey(key) {
|
66
|
+
return typeof key == 'string' && key in runeTreeKeys;
|
67
|
+
}
|
68
|
+
export function isRuneTreeName(name) {
|
69
|
+
return typeof name == 'string' && name in runeTreeNames;
|
70
|
+
}
|
@@ -0,0 +1,6 @@
|
|
1
|
+
import { SpellId, SpellKey, SpellName, Spells } from '../objects/generated/Spells';
|
2
|
+
/** Get a summoner spell by its **id**, **key** or **name**. */
|
3
|
+
export declare function getSpell(id_key_name: SpellId | SpellKey | SpellName): typeof Spells[keyof typeof Spells];
|
4
|
+
export declare function isSpellId(id: number | null | undefined): id is SpellId;
|
5
|
+
export declare function isSpellKey(key: string | null | undefined): key is SpellKey;
|
6
|
+
export declare function isSpellName(name: string | null | undefined): name is SpellName;
|
@@ -0,0 +1,18 @@
|
|
1
|
+
import { spellKeys, spellNames, Spells, } from '../objects/generated/Spells';
|
2
|
+
/** Get a summoner spell by its **id**, **key** or **name**. */
|
3
|
+
export function getSpell(id_key_name) {
|
4
|
+
if (typeof id_key_name == 'number')
|
5
|
+
return Spells[id_key_name];
|
6
|
+
if (isSpellKey(id_key_name))
|
7
|
+
return Spells[spellKeys[id_key_name]];
|
8
|
+
return Spells[spellNames[id_key_name]];
|
9
|
+
}
|
10
|
+
export function isSpellId(id) {
|
11
|
+
return typeof id == 'number' && id in Spells;
|
12
|
+
}
|
13
|
+
export function isSpellKey(key) {
|
14
|
+
return typeof key == 'string' && key in spellKeys;
|
15
|
+
}
|
16
|
+
export function isSpellName(name) {
|
17
|
+
return typeof name == 'string' && name in spellNames;
|
18
|
+
}
|
package/dist/index.d.ts
ADDED
@@ -0,0 +1,30 @@
|
|
1
|
+
export { lol } from './lol';
|
2
|
+
export { Patch } from './Patch';
|
3
|
+
export * from './constants/custom';
|
4
|
+
export * from './constants/events';
|
5
|
+
export * from './constants/history';
|
6
|
+
export * from './constants/leagues';
|
7
|
+
export * from './constants/locales';
|
8
|
+
export * from './constants/participants';
|
9
|
+
export { ItemSrTypes } from './enums/ItemSrTypes';
|
10
|
+
export { StatRuneSlots } from './enums/StatRuneSlots';
|
11
|
+
export { getChampion, isChampionId, isChampionKey, isChampionName, } from './helpers/champion';
|
12
|
+
export { getItem, isStarterItem, isBasicItem, isEpicItem, isLegendaryItem, isTrinketItem, isBootsItem, isConsumableItem, isItemAvailableOnMap, isItemId, isItemName, } from './helpers/item';
|
13
|
+
export type { RiotId } from './helpers/riotId';
|
14
|
+
export { makeRiotId, splitRiotId, validateRiotId, } from './helpers/riotId';
|
15
|
+
export { getRune, getStatRune, getRuneTree, isRuneId, isRuneKey, isRuneName, isStatRuneId, isStatRuneName, isRuneTreeId, isRuneTreeKey, isRuneTreeName, } from './helpers/rune';
|
16
|
+
export { getSpell, isSpellId, isSpellKey, isSpellName, } from './helpers/spell';
|
17
|
+
export type { MapId, MapTitle } from './objects/Maps';
|
18
|
+
export { MapsArr as Maps, getMap, isMapId, isMapTitle } from './objects/Maps';
|
19
|
+
export type { QueueId, QueueTitle } from './objects/Queues';
|
20
|
+
export { QueuesArr as Queues, isQueueId, isQueueTitle, getQueue, } from './objects/Queues';
|
21
|
+
export type { Platform, Region } from './objects/Regions';
|
22
|
+
export { RegionsArr as Regions, getRegion, isPlatform, isRegion, } from './objects/Regions';
|
23
|
+
export { ChampionsArr as Champions } from './objects/generated/Champions';
|
24
|
+
export type { ChampionId, ChampionKey, ChampionName, } from './objects/generated/Champions';
|
25
|
+
export { ItemsArr as Items } from './objects/generated/Items';
|
26
|
+
export type { ItemId, ItemName, } from './objects/generated/Items';
|
27
|
+
export { RunesArr as Runes, StatRunesArr as StatRunes, RuneTreesArr as RuneTrees, } from './objects/generated/Runes';
|
28
|
+
export type { RuneId, RuneKey, RuneName, StatRuneId, StatRuneName, RuneTreeId, RuneTreeKey, RuneTreeName, } from './objects/generated/Runes';
|
29
|
+
export { SpellsArr as Spells } from './objects/generated/Spells';
|
30
|
+
export type { SpellId, SpellKey, SpellName, } from './objects/generated/Spells';
|
package/dist/index.js
ADDED
@@ -0,0 +1,27 @@
|
|
1
|
+
// # .
|
2
|
+
export { lol } from './lol';
|
3
|
+
export { Patch } from './Patch';
|
4
|
+
// # constants
|
5
|
+
export * from './constants/custom';
|
6
|
+
export * from './constants/events';
|
7
|
+
export * from './constants/history';
|
8
|
+
export * from './constants/leagues';
|
9
|
+
export * from './constants/locales';
|
10
|
+
export * from './constants/participants';
|
11
|
+
// # enums
|
12
|
+
export { ItemSrTypes } from './enums/ItemSrTypes';
|
13
|
+
export { StatRuneSlots } from './enums/StatRuneSlots';
|
14
|
+
// # helpers
|
15
|
+
export { getChampion, isChampionId, isChampionKey, isChampionName, } from './helpers/champion';
|
16
|
+
export { getItem, isStarterItem, isBasicItem, isEpicItem, isLegendaryItem, isTrinketItem, isBootsItem, isConsumableItem, isItemAvailableOnMap, isItemId, isItemName, } from './helpers/item';
|
17
|
+
export { makeRiotId, splitRiotId, validateRiotId, } from './helpers/riotId';
|
18
|
+
export { getRune, getStatRune, getRuneTree, isRuneId, isRuneKey, isRuneName, isStatRuneId, isStatRuneName, isRuneTreeId, isRuneTreeKey, isRuneTreeName, } from './helpers/rune';
|
19
|
+
export { getSpell, isSpellId, isSpellKey, isSpellName, } from './helpers/spell';
|
20
|
+
export { MapsArr as Maps, getMap, isMapId, isMapTitle } from './objects/Maps';
|
21
|
+
export { QueuesArr as Queues, isQueueId, isQueueTitle, getQueue, } from './objects/Queues';
|
22
|
+
export { RegionsArr as Regions, getRegion, isPlatform, isRegion, } from './objects/Regions';
|
23
|
+
// ## generated
|
24
|
+
export { ChampionsArr as Champions } from './objects/generated/Champions';
|
25
|
+
export { ItemsArr as Items } from './objects/generated/Items';
|
26
|
+
export { RunesArr as Runes, StatRunesArr as StatRunes, RuneTreesArr as RuneTrees, } from './objects/generated/Runes';
|
27
|
+
export { SpellsArr as Spells } from './objects/generated/Spells';
|