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.
31 lines (30 loc) • 839 B
JavaScript
export const QueueTypes = {
'RANKED_SOLO_5x5': 'RANKED_SOLO_5x5',
'RANKED_FLEX_SR': 'RANKED_FLEX_SR',
'RANKED_TFT': 'RANKED_TFT',
};
export function isQueueType(type) {
return typeof type == 'string' && type in QueueTypes;
}
export const GameModes = {
'CLASSIC': 'CLASSIC',
'ARAM': 'ARAM',
'TUTORIAL': 'TUTORIAL',
'URF': 'URF',
'ONEFORALL': 'ONEFORALL',
'KINGPORO': 'KINGPORO',
'GAMEMODEX': 'GAMEMODEX',
'ULTBOOK': 'ULTBOOK',
'PRACTICETOOL': 'PRACTICETOOL',
};
export function isGameMode(mode) {
return typeof mode == 'string' && mode in GameModes;
}
export const GameTypes = {
'CUSTOM_GAME': 'CUSTOM_GAME',
'TUTORIAL_GAME': 'TUTORIAL_GAME',
'MATCHED_GAME': 'MATCHED_GAME',
};
export function isGameType(type) {
return typeof type == 'string' && type in GameTypes;
}