lol-constants 2.22.0 → 2.24.0
Sign up to get free protection for your applications and to get access to all the features.
- package/README.md +1 -1
- package/assets/constants/BootsItemNames.js +1 -4
- package/assets/constants/Champion.d.ts +175 -175
- package/assets/constants/Champion.js +1 -4
- package/assets/constants/Item.d.ts +4758 -7569
- package/assets/constants/Item.js +1 -4
- package/assets/constants/LegendaryItemNames.d.ts +1 -1
- package/assets/constants/LegendaryItemNames.js +4 -7
- package/assets/constants/RunesReforged.d.ts +2 -2
- package/assets/constants/RunesReforged.js +1 -4
- package/assets/constants/StatRunes.js +1 -4
- package/assets/constants/StatRunesByRow.js +1 -4
- package/assets/constants/Summoner.d.ts +1 -1
- package/assets/constants/Summoner.js +1 -4
- package/assets/index.js +4 -21
- package/assets/scripts/asset-scripts/champion.d.ts +1 -0
- package/assets/scripts/asset-scripts/champion.js +9 -0
- package/assets/scripts/asset-scripts/generate-all.d.ts +4 -0
- package/assets/scripts/asset-scripts/generate-all.js +4 -0
- package/assets/scripts/asset-scripts/item.d.ts +1 -0
- package/assets/scripts/asset-scripts/item.js +9 -0
- package/assets/scripts/asset-scripts/runes-reforged.d.ts +1 -0
- package/assets/scripts/asset-scripts/runes-reforged.js +9 -0
- package/assets/scripts/asset-scripts/summoner.d.ts +1 -0
- package/assets/scripts/asset-scripts/summoner.js +9 -0
- package/assets/scripts/constants/RuneIdComment.js +1 -4
- package/assets/scripts/generate-categorized-item-keys-num.js +15 -37
- package/assets/scripts/generate-categorized-item-keys.js +12 -34
- package/assets/scripts/generate-categorized-item-names.js +12 -34
- package/assets/scripts/generate-champion-ids-by-name.js +5 -7
- package/assets/scripts/generate-champion-ids.js +5 -7
- package/assets/scripts/generate-champion-keys-num.js +7 -9
- package/assets/scripts/generate-champion-keys.js +5 -7
- package/assets/scripts/generate-champion-names.js +5 -7
- package/assets/scripts/generate-item-keys-num.js +7 -9
- package/assets/scripts/generate-item-keys.js +5 -7
- package/assets/scripts/generate-item-names.js +5 -7
- package/assets/scripts/generate-non-stat-rune-ids-num.js +4 -6
- package/assets/scripts/generate-non-stat-rune-ids.js +6 -8
- package/assets/scripts/generate-non-stat-rune-names.js +4 -6
- package/assets/scripts/generate-rune-ids.js +8 -10
- package/assets/scripts/generate-rune-names.js +6 -8
- package/assets/scripts/generate-rune-picking-relationships.js +4 -6
- package/assets/scripts/generate-rune-sets-by-rune-names-num.js +12 -14
- package/assets/scripts/generate-rune-sets-by-rune-names.js +10 -12
- package/assets/scripts/generate-rune-sets.js +7 -9
- package/assets/scripts/generate-spell-ids-by-name.js +5 -7
- package/assets/scripts/generate-spell-ids.js +5 -7
- package/assets/scripts/generate-spell-keys-num.js +7 -9
- package/assets/scripts/generate-spell-keys.js +5 -7
- package/assets/scripts/generate-spell-names.js +5 -7
- package/assets/scripts/generate-stat-rune-ids.js +6 -8
- package/assets/scripts/generate-stat-rune-names.js +4 -6
- package/assets/scripts/helpers/enableEscapedValues.js +1 -5
- package/assets/scripts/helpers/generateIndexFile.js +1 -5
- package/assets/scripts/helpers/getExportStatement.js +6 -10
- package/assets/scripts/helpers/getFmtdComment.js +1 -5
- package/assets/scripts/helpers/validateNumber.js +1 -5
- package/assets/scripts/helpers/writeToTmpFile.js +5 -9
- package/assets/scripts/print-file-names.js +5 -7
- package/core/constants/Abilities.js +6 -11
- package/core/constants/BuildingTypes.js +3 -7
- package/core/constants/Champions/ChampionClasses.d.ts +17 -0
- package/core/constants/Champions/ChampionClasses.js +25 -0
- package/core/constants/Champions/ChampionIds.js +1 -4
- package/core/constants/Champions/ChampionIdsByName.js +1 -4
- package/core/constants/Champions/ChampionKeys.js +1 -4
- package/core/constants/Champions/ChampionKeysNum.js +1 -4
- package/core/constants/Champions/ChampionNames.js +1 -4
- package/core/constants/Continents.js +3 -7
- package/core/constants/DataDragonUrls.d.ts +17 -16
- package/core/constants/DataDragonUrls.js +4 -7
- package/core/constants/DragonTypes.js +3 -7
- package/core/constants/GameModes.js +3 -7
- package/core/constants/GameTypes.js +3 -7
- package/core/constants/Items/BootsItemKeys.js +1 -4
- package/core/constants/Items/BootsItemKeysNum.js +1 -4
- package/core/constants/Items/BootsItemNames.js +1 -4
- package/core/constants/Items/ItemKeys.d.ts +0 -34
- package/core/constants/Items/ItemKeys.js +1 -4
- package/core/constants/Items/ItemKeysNum.d.ts +0 -34
- package/core/constants/Items/ItemKeysNum.js +1 -4
- package/core/constants/Items/ItemNames.d.ts +0 -34
- package/core/constants/Items/ItemNames.js +1 -4
- package/core/constants/Items/ItemTypes.js +3 -7
- package/core/constants/Items/LegendaryItemKeys.d.ts +0 -20
- package/core/constants/Items/LegendaryItemKeys.js +1 -4
- package/core/constants/Items/LegendaryItemKeysNum.d.ts +0 -20
- package/core/constants/Items/LegendaryItemKeysNum.js +1 -4
- package/core/constants/Items/LegendaryItemNames.d.ts +0 -20
- package/core/constants/Items/LegendaryItemNames.js +1 -4
- package/core/constants/KillTypes.js +3 -7
- package/core/constants/LaneTypes.js +3 -7
- package/core/constants/Lanes.js +3 -7
- package/core/constants/LeagueTexts.js +3 -7
- package/core/constants/Levels.js +3 -7
- package/core/constants/Locales.js +3 -7
- package/core/constants/MapIds.js +3 -7
- package/core/constants/MonsterTypes.d.ts +2 -1
- package/core/constants/MonsterTypes.js +5 -8
- package/core/constants/ParticipantIds.js +3 -7
- package/core/constants/PlatformApiUris.js +3 -7
- package/core/constants/PlatformIds.js +6 -11
- package/core/constants/Positions.js +3 -7
- package/core/constants/QueueIds.js +5 -9
- package/core/constants/QueueTypes.js +3 -7
- package/core/constants/RankedRanks.js +3 -7
- package/core/constants/RankedTiers.js +3 -7
- package/core/constants/RegionalApiUris.js +3 -7
- package/core/constants/Regions.js +6 -11
- package/core/constants/RelativeTeams.js +3 -7
- package/core/constants/Roles.js +3 -7
- package/core/constants/Runes/NonStatRuneIds.js +1 -4
- package/core/constants/Runes/NonStatRuneIdsNum.js +1 -4
- package/core/constants/Runes/NonStatRuneNames.js +1 -4
- package/core/constants/Runes/RuneIconFileNames.js +1 -4
- package/core/constants/Runes/RunePickingRelationships.js +1 -4
- package/core/constants/Runes/RuneSets.js +8 -11
- package/core/constants/Runes/RuneSetsByRuneNames.js +8 -11
- package/core/constants/Runes/RuneSetsByRuneNamesNum.js +8 -11
- package/core/constants/Runes/RuneTreeIds.js +6 -11
- package/core/constants/Runes/RuneTreeIdsNum.js +6 -11
- package/core/constants/Runes/RuneTreeNames.js +6 -11
- package/core/constants/Runes/RuneTreeTypes.js +3 -7
- package/core/constants/SkillSlots.js +3 -7
- package/core/constants/Skills.js +3 -7
- package/core/constants/Spells/SpellIds.js +1 -4
- package/core/constants/Spells/SpellIdsByName.js +1 -4
- package/core/constants/Spells/SpellKeys.js +1 -4
- package/core/constants/Spells/SpellKeysNum.js +1 -4
- package/core/constants/Spells/SpellNames.js +1 -4
- package/core/constants/TeamIds.js +3 -7
- package/core/constants/TowerTypes.js +3 -7
- package/core/constants/WardTypes.js +3 -7
- package/core/helpers/Champions/getChampionIdByKey.js +3 -7
- package/core/helpers/Champions/getChampionIdByName.js +3 -7
- package/core/helpers/Champions/getChampionKeyById.js +3 -7
- package/core/helpers/Champions/getChampionKeyByName.js +4 -8
- package/core/helpers/Champions/getChampionNameById.js +4 -8
- package/core/helpers/Champions/getChampionNameByKey.js +3 -7
- package/core/helpers/Champions/isChampionId.js +3 -7
- package/core/helpers/Champions/isChampionKey.js +3 -7
- package/core/helpers/Champions/isChampionKeyNum.js +3 -7
- package/core/helpers/Champions/isChampionName.js +3 -7
- package/core/helpers/Items/getItemKeyByName.js +3 -7
- package/core/helpers/Items/getItemNameByKey.js +3 -7
- package/core/helpers/Items/isBootsItemKey.js +3 -7
- package/core/helpers/Items/isBootsItemKeyNum.js +3 -7
- package/core/helpers/Items/isBootsItemName.js +3 -7
- package/core/helpers/Items/isItemKey.js +3 -7
- package/core/helpers/Items/isItemKeyNum.js +3 -7
- package/core/helpers/Items/isItemName.js +3 -7
- package/core/helpers/Items/isLegendaryItemKey.js +3 -7
- package/core/helpers/Items/isLegendaryItemKeyNum.js +3 -7
- package/core/helpers/Items/isLegendaryItemName.js +3 -7
- package/core/helpers/Items/isTier2Boots.d.ts +3 -0
- package/core/helpers/Items/isTier2Boots.js +9 -0
- package/core/helpers/Runes/getNonStatRuneIdByName.js +3 -7
- package/core/helpers/Runes/getNonStatRuneNameById.js +3 -7
- package/core/helpers/Runes/getRuneCategoryName.js +8 -12
- package/core/helpers/Runes/getRuneCdnUrl.js +16 -20
- package/core/helpers/Runes/getRuneIdByName.js +3 -7
- package/core/helpers/Runes/getRuneNameById.js +3 -7
- package/core/helpers/Runes/getStatRuneIdByName.js +3 -7
- package/core/helpers/Runes/getStatRuneNameById.js +3 -7
- package/core/helpers/Runes/isDominationRuneId.js +3 -7
- package/core/helpers/Runes/isDominationRuneIdNum.js +3 -7
- package/core/helpers/Runes/isDominationRuneName.js +3 -7
- package/core/helpers/Runes/isInspirationRuneId.js +3 -7
- package/core/helpers/Runes/isInspirationRuneIdNum.js +3 -7
- package/core/helpers/Runes/isInspirationRuneName.js +3 -7
- package/core/helpers/Runes/isKeystoneRuneId.js +3 -7
- package/core/helpers/Runes/isKeystoneRuneIdNum.js +3 -7
- package/core/helpers/Runes/isKeystoneRuneName.js +3 -7
- package/core/helpers/Runes/isNonStatRuneId.js +3 -7
- package/core/helpers/Runes/isNonStatRuneIdNum.js +3 -7
- package/core/helpers/Runes/isNonStatRuneName.js +3 -7
- package/core/helpers/Runes/isPrecisionRuneId.js +3 -7
- package/core/helpers/Runes/isPrecisionRuneIdNum.js +3 -7
- package/core/helpers/Runes/isPrecisionRuneName.js +3 -7
- package/core/helpers/Runes/isResolveRuneId.js +3 -7
- package/core/helpers/Runes/isResolveRuneIdNum.js +3 -7
- package/core/helpers/Runes/isResolveRuneName.js +3 -7
- package/core/helpers/Runes/isRuneId.js +3 -7
- package/core/helpers/Runes/isRuneIdNum.js +3 -7
- package/core/helpers/Runes/isRuneName.js +3 -7
- package/core/helpers/Runes/isSorceryRuneId.js +3 -7
- package/core/helpers/Runes/isSorceryRuneIdNum.js +3 -7
- package/core/helpers/Runes/isSorceryRuneName.js +3 -7
- package/core/helpers/Runes/isStatRuneId.js +3 -7
- package/core/helpers/Runes/isStatRuneIdNum.js +3 -7
- package/core/helpers/Runes/isStatRuneName.js +3 -7
- package/core/helpers/Spells/getSpellIdByKey.js +3 -7
- package/core/helpers/Spells/getSpellIdByName.js +3 -7
- package/core/helpers/Spells/getSpellKeyById.js +3 -7
- package/core/helpers/Spells/getSpellKeyByName.js +4 -8
- package/core/helpers/Spells/getSpellNameById.js +4 -8
- package/core/helpers/Spells/getSpellNameByKey.js +3 -7
- package/core/helpers/Spells/isSpellId.js +3 -7
- package/core/helpers/Spells/isSpellKey.js +3 -7
- package/core/helpers/Spells/isSpellKeyNum.js +3 -7
- package/core/helpers/Spells/isSpellName.js +3 -7
- package/core/helpers/getPositionImageUrl.js +3 -7
- package/core/helpers/isRiotId.js +7 -11
- package/core/helpers/makeRiotId.js +1 -5
- package/core/helpers/splitRiotId.js +1 -5
- package/core/index.d.ts +4 -6
- package/core/index.js +138 -156
- package/core/types/championJson.js +1 -2
- package/core/types/interfaces.js +1 -2
- package/core/types/types.js +1 -2
- package/package.json +11 -6
- package/assets/constants/OrnnItemNames.d.ts +0 -1
- package/assets/constants/OrnnItemNames.js +0 -33
- package/assets/scripts/generate-all.d.ts +0 -23
- package/assets/scripts/generate-all.js +0 -29
- package/core/constants/Items/OrnnItemKeys.d.ts +0 -23
- package/core/constants/Items/OrnnItemKeys.js +0 -4
- package/core/constants/Items/OrnnItemKeysNum.d.ts +0 -23
- package/core/constants/Items/OrnnItemKeysNum.js +0 -4
- package/core/constants/Items/OrnnItemNames.d.ts +0 -23
- package/core/constants/Items/OrnnItemNames.js +0 -4
- package/core/constants/QueueDescriptions.d.ts +0 -4
- package/core/constants/QueueDescriptions.js +0 -31
- package/core/helpers/Items/isOrnnItemKey.d.ts +0 -2
- package/core/helpers/Items/isOrnnItemKey.js +0 -8
- package/core/helpers/Items/isOrnnItemKeyNum.d.ts +0 -2
- package/core/helpers/Items/isOrnnItemKeyNum.js +0 -8
- package/core/helpers/Items/isOrnnItemName.d.ts +0 -2
- package/core/helpers/Items/isOrnnItemName.js +0 -8
@@ -1,8 +1,4 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
4
|
-
const NonStatRuneIds_1 = require("../../constants/Runes/NonStatRuneIds");
|
5
|
-
function isNonStatRuneName(name) {
|
6
|
-
return typeof name == 'string' && name in NonStatRuneIds_1.NonStatRuneIds;
|
1
|
+
import { NonStatRuneIds } from '../../constants/Runes/NonStatRuneIds';
|
2
|
+
export function isNonStatRuneName(name) {
|
3
|
+
return typeof name == 'string' && name in NonStatRuneIds;
|
7
4
|
}
|
8
|
-
exports.isNonStatRuneName = isNonStatRuneName;
|
@@ -1,8 +1,4 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
4
|
-
const RuneSets_1 = require("../../constants/Runes/RuneSets");
|
5
|
-
function isPrecisionRuneId(id) {
|
6
|
-
return id in RuneSets_1.PrimaryRuneTrees.Precision;
|
1
|
+
import { PrimaryRuneTrees } from '../../constants/Runes/RuneSets';
|
2
|
+
export function isPrecisionRuneId(id) {
|
3
|
+
return id in PrimaryRuneTrees.Precision;
|
7
4
|
}
|
8
|
-
exports.isPrecisionRuneId = isPrecisionRuneId;
|
@@ -1,8 +1,4 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
4
|
-
const RuneSets_1 = require("../../constants/Runes/RuneSets");
|
5
|
-
function isPrecisionRuneIdNum(id) {
|
6
|
-
return id in RuneSets_1.PrimaryRuneTrees.Precision;
|
1
|
+
import { PrimaryRuneTrees } from '../../constants/Runes/RuneSets';
|
2
|
+
export function isPrecisionRuneIdNum(id) {
|
3
|
+
return id in PrimaryRuneTrees.Precision;
|
7
4
|
}
|
8
|
-
exports.isPrecisionRuneIdNum = isPrecisionRuneIdNum;
|
@@ -1,8 +1,4 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
4
|
-
const RuneSetsByRuneNames_1 = require("../../constants/Runes/RuneSetsByRuneNames");
|
5
|
-
function isPrecisionRuneName(value) {
|
6
|
-
return typeof value == 'string' && value in RuneSetsByRuneNames_1.RuneSetsByRuneNames.PrimaryRuneTreesByRuneNames.Precision;
|
1
|
+
import { RuneSetsByRuneNames } from '../../constants/Runes/RuneSetsByRuneNames';
|
2
|
+
export function isPrecisionRuneName(value) {
|
3
|
+
return typeof value == 'string' && value in RuneSetsByRuneNames.PrimaryRuneTreesByRuneNames.Precision;
|
7
4
|
}
|
8
|
-
exports.isPrecisionRuneName = isPrecisionRuneName;
|
@@ -1,8 +1,4 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
4
|
-
const RuneSets_1 = require("../../constants/Runes/RuneSets");
|
5
|
-
function isResolveRuneId(id) {
|
6
|
-
return id in RuneSets_1.PrimaryRuneTrees.Resolve;
|
1
|
+
import { PrimaryRuneTrees } from '../../constants/Runes/RuneSets';
|
2
|
+
export function isResolveRuneId(id) {
|
3
|
+
return id in PrimaryRuneTrees.Resolve;
|
7
4
|
}
|
8
|
-
exports.isResolveRuneId = isResolveRuneId;
|
@@ -1,8 +1,4 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
4
|
-
const RuneSets_1 = require("../../constants/Runes/RuneSets");
|
5
|
-
function isResolveRuneIdNum(id) {
|
6
|
-
return id in RuneSets_1.PrimaryRuneTrees.Resolve;
|
1
|
+
import { PrimaryRuneTrees } from '../../constants/Runes/RuneSets';
|
2
|
+
export function isResolveRuneIdNum(id) {
|
3
|
+
return id in PrimaryRuneTrees.Resolve;
|
7
4
|
}
|
8
|
-
exports.isResolveRuneIdNum = isResolveRuneIdNum;
|
@@ -1,8 +1,4 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
4
|
-
const RuneSetsByRuneNames_1 = require("../../constants/Runes/RuneSetsByRuneNames");
|
5
|
-
function isResolveRuneName(value) {
|
6
|
-
return typeof value == 'string' && value in RuneSetsByRuneNames_1.RuneSetsByRuneNames.PrimaryRuneTreesByRuneNames.Resolve;
|
1
|
+
import { RuneSetsByRuneNames } from '../../constants/Runes/RuneSetsByRuneNames';
|
2
|
+
export function isResolveRuneName(value) {
|
3
|
+
return typeof value == 'string' && value in RuneSetsByRuneNames.PrimaryRuneTreesByRuneNames.Resolve;
|
7
4
|
}
|
8
|
-
exports.isResolveRuneName = isResolveRuneName;
|
@@ -1,8 +1,4 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
4
|
-
const RuneSets_1 = require("../../constants/Runes/RuneSets");
|
5
|
-
function isRuneId(id) {
|
6
|
-
return id in RuneSets_1.RuneNames;
|
1
|
+
import { RuneNames } from '../../constants/Runes/RuneSets';
|
2
|
+
export function isRuneId(id) {
|
3
|
+
return id in RuneNames;
|
7
4
|
}
|
8
|
-
exports.isRuneId = isRuneId;
|
@@ -1,8 +1,4 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
4
|
-
const RuneSets_1 = require("../../constants/Runes/RuneSets");
|
5
|
-
function isRuneIdNum(id) {
|
6
|
-
return id in RuneSets_1.RuneNames;
|
1
|
+
import { RuneNames } from '../../constants/Runes/RuneSets';
|
2
|
+
export function isRuneIdNum(id) {
|
3
|
+
return id in RuneNames;
|
7
4
|
}
|
8
|
-
exports.isRuneIdNum = isRuneIdNum;
|
@@ -1,8 +1,4 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
4
|
-
const RuneSetsByRuneNames_1 = require("../../constants/Runes/RuneSetsByRuneNames");
|
5
|
-
function isRuneName(name) {
|
6
|
-
return typeof name == 'string' && name in RuneSetsByRuneNames_1.RuneIds;
|
1
|
+
import { RuneIds } from '../../constants/Runes/RuneSetsByRuneNames';
|
2
|
+
export function isRuneName(name) {
|
3
|
+
return typeof name == 'string' && name in RuneIds;
|
7
4
|
}
|
8
|
-
exports.isRuneName = isRuneName;
|
@@ -1,8 +1,4 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
4
|
-
const RuneSets_1 = require("../../constants/Runes/RuneSets");
|
5
|
-
function isSorceryRuneId(id) {
|
6
|
-
return id in RuneSets_1.PrimaryRuneTrees.Sorcery;
|
1
|
+
import { PrimaryRuneTrees } from '../../constants/Runes/RuneSets';
|
2
|
+
export function isSorceryRuneId(id) {
|
3
|
+
return id in PrimaryRuneTrees.Sorcery;
|
7
4
|
}
|
8
|
-
exports.isSorceryRuneId = isSorceryRuneId;
|
@@ -1,8 +1,4 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
4
|
-
const RuneSets_1 = require("../../constants/Runes/RuneSets");
|
5
|
-
function isSorceryRuneIdNum(id) {
|
6
|
-
return id in RuneSets_1.PrimaryRuneTrees.Sorcery;
|
1
|
+
import { PrimaryRuneTrees } from '../../constants/Runes/RuneSets';
|
2
|
+
export function isSorceryRuneIdNum(id) {
|
3
|
+
return id in PrimaryRuneTrees.Sorcery;
|
7
4
|
}
|
8
|
-
exports.isSorceryRuneIdNum = isSorceryRuneIdNum;
|
@@ -1,8 +1,4 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
4
|
-
const RuneSetsByRuneNames_1 = require("../../constants/Runes/RuneSetsByRuneNames");
|
5
|
-
function isSorceryRuneName(value) {
|
6
|
-
return typeof value == 'string' && value in RuneSetsByRuneNames_1.RuneSetsByRuneNames.PrimaryRuneTreesByRuneNames.Sorcery;
|
1
|
+
import { RuneSetsByRuneNames } from '../../constants/Runes/RuneSetsByRuneNames';
|
2
|
+
export function isSorceryRuneName(value) {
|
3
|
+
return typeof value == 'string' && value in RuneSetsByRuneNames.PrimaryRuneTreesByRuneNames.Sorcery;
|
7
4
|
}
|
8
|
-
exports.isSorceryRuneName = isSorceryRuneName;
|
@@ -1,8 +1,4 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
4
|
-
const RuneSets_1 = require("../../constants/Runes/RuneSets");
|
5
|
-
function isStatRuneId(id) {
|
6
|
-
return id in RuneSets_1.StatRuneNames;
|
1
|
+
import { StatRuneNames } from '../../constants/Runes/RuneSets';
|
2
|
+
export function isStatRuneId(id) {
|
3
|
+
return id in StatRuneNames;
|
7
4
|
}
|
8
|
-
exports.isStatRuneId = isStatRuneId;
|
@@ -1,8 +1,4 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
4
|
-
const RuneSets_1 = require("../../constants/Runes/RuneSets");
|
5
|
-
function isStatRuneIdNum(id) {
|
6
|
-
return id in RuneSets_1.StatRuneNames;
|
1
|
+
import { StatRuneNames } from '../../constants/Runes/RuneSets';
|
2
|
+
export function isStatRuneIdNum(id) {
|
3
|
+
return id in StatRuneNames;
|
7
4
|
}
|
8
|
-
exports.isStatRuneIdNum = isStatRuneIdNum;
|
@@ -1,8 +1,4 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
4
|
-
const RuneSetsByRuneNames_1 = require("../../constants/Runes/RuneSetsByRuneNames");
|
5
|
-
function isStatRuneName(name) {
|
6
|
-
return typeof name == 'string' && name in RuneSetsByRuneNames_1.StatRuneIds;
|
1
|
+
import { StatRuneIds } from '../../constants/Runes/RuneSetsByRuneNames';
|
2
|
+
export function isStatRuneName(name) {
|
3
|
+
return typeof name == 'string' && name in StatRuneIds;
|
7
4
|
}
|
8
|
-
exports.isStatRuneName = isStatRuneName;
|
@@ -1,8 +1,4 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
4
|
-
const SpellIds_1 = require("../../constants/Spells/SpellIds");
|
5
|
-
function getSpellIdByKey(key) {
|
6
|
-
return SpellIds_1.SpellIds[key];
|
1
|
+
import { SpellIds } from '../../constants/Spells/SpellIds';
|
2
|
+
export function getSpellIdByKey(key) {
|
3
|
+
return SpellIds[key];
|
7
4
|
}
|
8
|
-
exports.getSpellIdByKey = getSpellIdByKey;
|
@@ -1,8 +1,4 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
4
|
-
const SpellIdsByName_1 = require("../../constants/Spells/SpellIdsByName");
|
5
|
-
function getSpellIdByName(name) {
|
6
|
-
return SpellIdsByName_1.SpellIdsByName[name];
|
1
|
+
import { SpellIdsByName } from '../../constants/Spells/SpellIdsByName';
|
2
|
+
export function getSpellIdByName(name) {
|
3
|
+
return SpellIdsByName[name];
|
7
4
|
}
|
8
|
-
exports.getSpellIdByName = getSpellIdByName;
|
@@ -1,8 +1,4 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
4
|
-
const SpellKeys_1 = require("../../constants/Spells/SpellKeys");
|
5
|
-
function getSpellKeyById(id) {
|
6
|
-
return SpellKeys_1.SpellKeys[id];
|
1
|
+
import { SpellKeys } from '../../constants/Spells/SpellKeys';
|
2
|
+
export function getSpellKeyById(id) {
|
3
|
+
return SpellKeys[id];
|
7
4
|
}
|
8
|
-
exports.getSpellKeyById = getSpellKeyById;
|
@@ -1,9 +1,5 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
const SpellKeys_1 = require("../../constants/Spells/SpellKeys");
|
6
|
-
function getSpellKeyByName(name) {
|
7
|
-
return SpellKeys_1.SpellKeys[SpellIdsByName_1.SpellIdsByName[name]];
|
1
|
+
import { SpellIdsByName } from '../../constants/Spells/SpellIdsByName';
|
2
|
+
import { SpellKeys } from '../../constants/Spells/SpellKeys';
|
3
|
+
export function getSpellKeyByName(name) {
|
4
|
+
return SpellKeys[SpellIdsByName[name]];
|
8
5
|
}
|
9
|
-
exports.getSpellKeyByName = getSpellKeyByName;
|
@@ -1,9 +1,5 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
const SpellNames_1 = require("../../constants/Spells/SpellNames");
|
6
|
-
function getSpellNameById(id) {
|
7
|
-
return SpellNames_1.SpellNames[SpellKeys_1.SpellKeys[id]];
|
1
|
+
import { SpellKeys } from '../../constants/Spells/SpellKeys';
|
2
|
+
import { SpellNames } from '../../constants/Spells/SpellNames';
|
3
|
+
export function getSpellNameById(id) {
|
4
|
+
return SpellNames[SpellKeys[id]];
|
8
5
|
}
|
9
|
-
exports.getSpellNameById = getSpellNameById;
|
@@ -1,8 +1,4 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
4
|
-
const SpellNames_1 = require("../../constants/Spells/SpellNames");
|
5
|
-
function getSpellNameByKey(key) {
|
6
|
-
return SpellNames_1.SpellNames[key];
|
1
|
+
import { SpellNames } from '../../constants/Spells/SpellNames';
|
2
|
+
export function getSpellNameByKey(key) {
|
3
|
+
return SpellNames[key];
|
7
4
|
}
|
8
|
-
exports.getSpellNameByKey = getSpellNameByKey;
|
@@ -1,8 +1,4 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
4
|
-
const SpellKeys_1 = require("../../constants/Spells/SpellKeys");
|
5
|
-
function isSpellId(id) {
|
6
|
-
return typeof id == 'string' && id in SpellKeys_1.SpellKeys;
|
1
|
+
import { SpellKeys } from '../../constants/Spells/SpellKeys';
|
2
|
+
export function isSpellId(id) {
|
3
|
+
return typeof id == 'string' && id in SpellKeys;
|
7
4
|
}
|
8
|
-
exports.isSpellId = isSpellId;
|
@@ -1,8 +1,4 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
4
|
-
const SpellNames_1 = require("../../constants/Spells/SpellNames");
|
5
|
-
function isSpellKey(key) {
|
6
|
-
return key in SpellNames_1.SpellNames;
|
1
|
+
import { SpellNames } from '../../constants/Spells/SpellNames';
|
2
|
+
export function isSpellKey(key) {
|
3
|
+
return key in SpellNames;
|
7
4
|
}
|
8
|
-
exports.isSpellKey = isSpellKey;
|
@@ -1,8 +1,4 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
4
|
-
const SpellNames_1 = require("../../constants/Spells/SpellNames");
|
5
|
-
function isSpellKeyNum(key) {
|
6
|
-
return key in SpellNames_1.SpellNames;
|
1
|
+
import { SpellNames } from '../../constants/Spells/SpellNames';
|
2
|
+
export function isSpellKeyNum(key) {
|
3
|
+
return key in SpellNames;
|
7
4
|
}
|
8
|
-
exports.isSpellKeyNum = isSpellKeyNum;
|
@@ -1,8 +1,4 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
4
|
-
const SpellIdsByName_1 = require("../../constants/Spells/SpellIdsByName");
|
5
|
-
function isSpellName(name) {
|
6
|
-
return typeof name == 'string' && name in SpellIdsByName_1.SpellIdsByName;
|
1
|
+
import { SpellIdsByName } from '../../constants/Spells/SpellIdsByName';
|
2
|
+
export function isSpellName(name) {
|
3
|
+
return typeof name == 'string' && name in SpellIdsByName;
|
7
4
|
}
|
8
|
-
exports.isSpellName = isSpellName;
|
@@ -1,11 +1,7 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
4
|
-
const DataDragonUrls_1 = require("../constants/DataDragonUrls");
|
5
|
-
function getPositionImageUrl(position) {
|
6
|
-
return `${DataDragonUrls_1.DataDragonUrls.POSITION_ICON_BASE}/${PositionUrlPaths[position]}.svg`;
|
1
|
+
import { DataDragonUrls } from '../constants/DataDragonUrls';
|
2
|
+
export function getPositionImageUrl(position) {
|
3
|
+
return `${DataDragonUrls.POSITION_ICON_BASE}/${PositionUrlPaths[position]}.svg`;
|
7
4
|
}
|
8
|
-
exports.getPositionImageUrl = getPositionImageUrl;
|
9
5
|
const PositionUrlPaths = {
|
10
6
|
TOP: 'position-top',
|
11
7
|
JUNGLE: 'position-jungle',
|
package/core/helpers/isRiotId.js
CHANGED
@@ -1,19 +1,15 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
exports.maxRiotIdTagCharCount = exports.maxRiotIdNameCharCount = exports.isRiotId = void 0;
|
4
|
-
const splitRiotId_1 = require("./splitRiotId");
|
5
|
-
function isRiotId(riotId,
|
1
|
+
import { splitRiotId } from './splitRiotId';
|
2
|
+
export function isRiotId(riotId,
|
6
3
|
/** @default '#' */
|
7
4
|
splitChar = '#') {
|
8
5
|
if (typeof riotId != 'string')
|
9
6
|
return false;
|
10
|
-
const id =
|
11
|
-
if (id.name == '' || id.name.length >
|
7
|
+
const id = splitRiotId(riotId, splitChar);
|
8
|
+
if (id.name == '' || id.name.length > maxRiotIdNameCharCount)
|
12
9
|
return false;
|
13
|
-
if (id.tag == '' || id.tag.length >
|
10
|
+
if (id.tag == '' || id.tag.length > maxRiotIdTagCharCount)
|
14
11
|
return false;
|
15
12
|
return true;
|
16
13
|
}
|
17
|
-
|
18
|
-
|
19
|
-
exports.maxRiotIdTagCharCount = 5;
|
14
|
+
export const maxRiotIdNameCharCount = 16;
|
15
|
+
export const maxRiotIdTagCharCount = 5;
|
@@ -1,9 +1,5 @@
|
|
1
|
-
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
-
exports.makeRiotId = void 0;
|
4
|
-
function makeRiotId(riotId,
|
1
|
+
export function makeRiotId(riotId,
|
5
2
|
/** @default '#' */
|
6
3
|
splitChar = '#') {
|
7
4
|
return riotId.name + splitChar + riotId.tag;
|
8
5
|
}
|
9
|
-
exports.makeRiotId = makeRiotId;
|
@@ -1,10 +1,7 @@
|
|
1
|
-
"use strict";
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
-
exports.splitRiotId = void 0;
|
4
1
|
/**
|
5
2
|
* `name#tag` => `{name, tag}`
|
6
3
|
*/
|
7
|
-
function splitRiotId(riotId,
|
4
|
+
export function splitRiotId(riotId,
|
8
5
|
/** @default '#' */
|
9
6
|
splitChar = '#') {
|
10
7
|
const split = riotId.split(splitChar);
|
@@ -17,4 +14,3 @@ splitChar = '#') {
|
|
17
14
|
tag,
|
18
15
|
};
|
19
16
|
}
|
20
|
-
exports.splitRiotId = splitRiotId;
|
package/core/index.d.ts
CHANGED
@@ -29,6 +29,7 @@ export * from './constants/SkillSlots';
|
|
29
29
|
export * from './constants/TeamIds';
|
30
30
|
export * from './constants/TowerTypes';
|
31
31
|
export * from './constants/WardTypes';
|
32
|
+
export * from './constants/Champions/ChampionClasses';
|
32
33
|
export * from './constants/Champions/ChampionIds';
|
33
34
|
export * from './constants/Champions/ChampionIdsByName';
|
34
35
|
export * from './constants/Champions/ChampionKeys';
|
@@ -44,9 +45,6 @@ export * from './constants/Items/ItemTypes';
|
|
44
45
|
export * from './constants/Items/LegendaryItemKeys';
|
45
46
|
export * from './constants/Items/LegendaryItemKeysNum';
|
46
47
|
export * from './constants/Items/LegendaryItemNames';
|
47
|
-
export * from './constants/Items/OrnnItemKeys';
|
48
|
-
export * from './constants/Items/OrnnItemKeysNum';
|
49
|
-
export * from './constants/Items/OrnnItemNames';
|
50
48
|
export * from './constants/Runes/NonStatRuneIds';
|
51
49
|
export * from './constants/Runes/NonStatRuneIdsNum';
|
52
50
|
export * from './constants/Runes/NonStatRuneNames';
|
@@ -81,15 +79,15 @@ export * from './helpers/Champions/isChampionName';
|
|
81
79
|
export * from './helpers/Items/getItemKeyByName';
|
82
80
|
export * from './helpers/Items/getItemNameByKey';
|
83
81
|
export * from './helpers/Items/isBootsItemKey';
|
82
|
+
export * from './helpers/Items/isBootsItemKeyNum';
|
84
83
|
export * from './helpers/Items/isBootsItemName';
|
85
84
|
export * from './helpers/Items/isItemKey';
|
86
85
|
export * from './helpers/Items/isItemKeyNum';
|
87
86
|
export * from './helpers/Items/isItemName';
|
88
87
|
export * from './helpers/Items/isLegendaryItemKey';
|
88
|
+
export * from './helpers/Items/isLegendaryItemKeyNum';
|
89
89
|
export * from './helpers/Items/isLegendaryItemName';
|
90
|
-
export * from './helpers/Items/
|
91
|
-
export * from './helpers/Items/isOrnnItemKeyNum';
|
92
|
-
export * from './helpers/Items/isOrnnItemName';
|
90
|
+
export * from './helpers/Items/isTier2Boots';
|
93
91
|
export * from './helpers/Runes/getNonStatRuneIdByName';
|
94
92
|
export * from './helpers/Runes/getNonStatRuneNameById';
|
95
93
|
export * from './helpers/Runes/getRuneCategoryName';
|