UNPKG

lol-constants

Version:

League of Legends constants, functions, and types. Provides a plathera of functions to easily convert between ID, Name, and Key for champions, items, summoner spells, and runes.

25 lines (24 loc) 582 B
export const RankedTiers = { 'CHALLENGER': 'CHALLENGER', 'GRANDMASTER': 'GRANDMASTER', 'MASTER': 'MASTER', 'DIAMOND': 'DIAMOND', 'EMERALD': 'EMERALD', 'PLATINUM': 'PLATINUM', 'GOLD': 'GOLD', 'SILVER': 'SILVER', 'BRONZE': 'BRONZE', 'IRON': 'IRON', }; export function isRankedTier(tier) { return typeof tier == 'string' && tier in RankedTiers; } export const RankedRanks = { 'I': 'I', 'II': 'II', 'III': 'III', 'IV': 'IV', }; export function isRankedRank(rank) { return typeof rank == 'string' && rank in RankedRanks; }