lol-constants 0.7.0 → 0.9.2
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/Constants/StatRuneIds.d.ts +2 -0
- package/dist/Constants/StatRuneIds.js +5 -0
- package/dist/Constants/StatRuneNames.d.ts +2 -0
- package/dist/Constants/StatRuneNames.js +5 -0
- package/dist/Constants/StatRunes.d.ts +9 -9
- package/dist/Constants/StatRunes.js +9 -9
- package/dist/Constants/SummonerSpellIds.d.ts +2 -0
- package/dist/Constants/SummonerSpellIds.js +8 -0
- package/dist/Constants/SummonerSpellKeys.d.ts +2 -0
- package/dist/Constants/SummonerSpellKeys.js +8 -0
- package/dist/Constants/SummonerSpellNames.d.ts +2 -0
- package/dist/Constants/SummonerSpellNames.js +8 -0
- package/dist/Constants/TreeRuneIds.d.ts +2 -0
- package/dist/Constants/TreeRuneIds.js +8 -0
- package/dist/Constants/TreeRuneNames.d.ts +2 -0
- package/dist/Constants/TreeRuneNames.js +8 -0
- package/dist/Helpers/generateSummonerSpellsByKey.d.ts +1 -0
- package/dist/Helpers/generateSummonerSpellsByKey.js +24 -0
- package/dist/Helpers/generateSummonerSpellsByName.d.ts +1 -0
- package/dist/Helpers/generateSummonerSpellsByName.js +24 -0
- package/dist/Helpers/getChampionKeyByName.d.ts +2 -0
- package/dist/Helpers/getChampionKeyByName.js +11 -0
- package/dist/Helpers/getChampionNameByKey.d.ts +2 -0
- package/dist/Helpers/getChampionNameByKey.js +11 -0
- package/dist/Helpers/getItemKeyByName.d.ts +2 -0
- package/dist/Helpers/getItemKeyByName.js +11 -0
- package/dist/Helpers/getItemNameByKey.d.ts +2 -0
- package/dist/Helpers/getItemNameByKey.js +11 -0
- package/dist/Helpers/getRuneIdByName.d.ts +2 -0
- package/dist/Helpers/getRuneIdByName.js +21 -0
- package/dist/Helpers/getRuneNameById.d.ts +2 -0
- package/dist/Helpers/getRuneNameById.js +15 -0
- package/dist/Helpers/getSummonerSpellKeyByName.d.ts +2 -0
- package/dist/Helpers/getSummonerSpellKeyByName.js +11 -0
- package/dist/Helpers/getSummonerSpellNameByKey.d.ts +2 -0
- package/dist/Helpers/getSummonerSpellNameByKey.js +11 -0
- package/dist/Helpers/isChampionKey.d.ts +2 -0
- package/dist/Helpers/isChampionKey.js +10 -0
- package/dist/Helpers/isChampionName.d.ts +2 -0
- package/dist/Helpers/isChampionName.js +10 -0
- package/dist/Helpers/isItemKey.d.ts +2 -0
- package/dist/Helpers/isItemKey.js +10 -0
- package/dist/Helpers/isItemName.d.ts +2 -0
- package/dist/Helpers/isItemName.js +10 -0
- package/dist/Helpers/isRuneId.d.ts +2 -0
- package/dist/Helpers/isRuneId.js +10 -0
- package/dist/Helpers/isRuneName.d.ts +2 -0
- package/dist/Helpers/isRuneName.js +10 -0
- package/dist/Helpers/isStatRuneId.d.ts +2 -0
- package/dist/Helpers/isStatRuneId.js +10 -0
- package/dist/Helpers/isStatRuneName.d.ts +2 -0
- package/dist/Helpers/isStatRuneName.js +10 -0
- package/dist/Helpers/isSummonerId.d.ts +2 -0
- package/dist/Helpers/isSummonerId.js +10 -0
- package/dist/Helpers/isSummonerKey.d.ts +2 -0
- package/dist/Helpers/isSummonerKey.js +10 -0
- package/dist/Helpers/isSummonerName.d.ts +2 -0
- package/dist/Helpers/isSummonerName.js +10 -0
- package/dist/Helpers/isSummonerSpellId.d.ts +2 -0
- package/dist/Helpers/isSummonerSpellId.js +10 -0
- package/dist/Helpers/isSummonerSpellKey.d.ts +2 -0
- package/dist/Helpers/isSummonerSpellKey.js +10 -0
- package/dist/Helpers/isSummonerSpellName.d.ts +2 -0
- package/dist/Helpers/isSummonerSpellName.js +10 -0
- package/dist/Helpers/isTreeRuneId.d.ts +2 -0
- package/dist/Helpers/isTreeRuneId.js +10 -0
- package/dist/Helpers/isTreeRuneName.d.ts +2 -0
- package/dist/Helpers/isTreeRuneName.js +10 -0
- package/dist/index.d.ts +28 -3
- package/dist/index.js +57 -7
- package/dist/scripts/generate-all.js +4 -4
- package/dist/types/index.d.ts +9 -5
- package/package.json +2 -2
@@ -1,11 +1,11 @@
|
|
1
1
|
export declare const StatRunes: {
|
2
|
-
readonly '5001': "
|
3
|
-
readonly '5002': "
|
4
|
-
readonly '5003': "
|
5
|
-
readonly '5002f': "
|
6
|
-
readonly '5003f': "
|
7
|
-
readonly '5008f': "
|
8
|
-
readonly '5005': "
|
9
|
-
readonly '5007': "
|
10
|
-
readonly '5008': "
|
2
|
+
readonly '5001': "Defense (HP)";
|
3
|
+
readonly '5002': "Defense (AR)";
|
4
|
+
readonly '5003': "Defense (MR)";
|
5
|
+
readonly '5002f': "Flex (AR)";
|
6
|
+
readonly '5003f': "Flex (MR)";
|
7
|
+
readonly '5008f': "Flex (AF)";
|
8
|
+
readonly '5005': "Offense (AS)";
|
9
|
+
readonly '5007': "Offense (AH)";
|
10
|
+
readonly '5008': "Offense (AF)";
|
11
11
|
};
|
@@ -2,13 +2,13 @@
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
3
3
|
exports.StatRunes = void 0;
|
4
4
|
exports.StatRunes = {
|
5
|
-
'5001': '
|
6
|
-
'5002': '
|
7
|
-
'5003': '
|
8
|
-
'5002f': '
|
9
|
-
'5003f': '
|
10
|
-
'5008f': '
|
11
|
-
'5005': '
|
12
|
-
'5007': '
|
13
|
-
'5008': '
|
5
|
+
'5001': 'Defense (HP)',
|
6
|
+
'5002': 'Defense (AR)',
|
7
|
+
'5003': 'Defense (MR)',
|
8
|
+
'5002f': 'Flex (AR)',
|
9
|
+
'5003f': 'Flex (MR)',
|
10
|
+
'5008f': 'Flex (AF)',
|
11
|
+
'5005': 'Offense (AS)',
|
12
|
+
'5007': 'Offense (AH)',
|
13
|
+
'5008': 'Offense (AF)',
|
14
14
|
};
|
@@ -0,0 +1,8 @@
|
|
1
|
+
"use strict";
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
4
|
+
};
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
6
|
+
exports.SummonerSpellIds = void 0;
|
7
|
+
const summoner_json_1 = __importDefault(require("../assets/summoner.json"));
|
8
|
+
exports.SummonerSpellIds = (Object.keys(summoner_json_1.default.data).map(id => id));
|
@@ -0,0 +1,8 @@
|
|
1
|
+
"use strict";
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
4
|
+
};
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
6
|
+
exports.SummonerSpellKeys = void 0;
|
7
|
+
const summonerByKey_json_1 = __importDefault(require("../generated/summonerByKey.json"));
|
8
|
+
exports.SummonerSpellKeys = (Object.keys(summonerByKey_json_1.default.data).map(key => key));
|
@@ -0,0 +1,8 @@
|
|
1
|
+
"use strict";
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
4
|
+
};
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
6
|
+
exports.SummonerSpellNames = void 0;
|
7
|
+
const summonerByName_json_1 = __importDefault(require("../generated/summonerByName.json"));
|
8
|
+
exports.SummonerSpellNames = (Object.keys(summonerByName_json_1.default.data).map(name => name));
|
@@ -0,0 +1,8 @@
|
|
1
|
+
"use strict";
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
4
|
+
};
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
6
|
+
exports.TreeRuneIds = void 0;
|
7
|
+
const runesById_json_1 = __importDefault(require("../generated/runesById.json"));
|
8
|
+
exports.TreeRuneIds = (Object.keys(runesById_json_1.default).map(id => id));
|
@@ -0,0 +1,8 @@
|
|
1
|
+
"use strict";
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
4
|
+
};
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
6
|
+
exports.TreeRuneNames = void 0;
|
7
|
+
const runesByName_json_1 = __importDefault(require("../generated/runesByName.json"));
|
8
|
+
exports.TreeRuneNames = (Object.keys(runesByName_json_1.default).map(name => name));
|
@@ -0,0 +1 @@
|
|
1
|
+
export declare function generateSummonerSpellsByKey(): void;
|
@@ -0,0 +1,24 @@
|
|
1
|
+
"use strict";
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
4
|
+
};
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
6
|
+
exports.generateSummonerSpellsByKey = void 0;
|
7
|
+
const fs_1 = __importDefault(require("fs"));
|
8
|
+
const summoner_json_1 = __importDefault(require("../assets/summoner.json"));
|
9
|
+
function generateSummonerSpellsByKey() {
|
10
|
+
const summonersByKey = {
|
11
|
+
data: {},
|
12
|
+
version: '',
|
13
|
+
};
|
14
|
+
let summonerId;
|
15
|
+
for (summonerId in summoner_json_1.default.data) {
|
16
|
+
const summonerData = summoner_json_1.default.data[summonerId];
|
17
|
+
summonersByKey.data[summonerData.key] = {
|
18
|
+
...summonerData,
|
19
|
+
};
|
20
|
+
}
|
21
|
+
summonersByKey.version = summoner_json_1.default.version;
|
22
|
+
fs_1.default.writeFileSync(`src/generated/summonerByKey.json`, JSON.stringify(summonersByKey));
|
23
|
+
}
|
24
|
+
exports.generateSummonerSpellsByKey = generateSummonerSpellsByKey;
|
@@ -0,0 +1 @@
|
|
1
|
+
export declare function generateSummonerSpellsByName(): void;
|
@@ -0,0 +1,24 @@
|
|
1
|
+
"use strict";
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
4
|
+
};
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
6
|
+
exports.generateSummonerSpellsByName = void 0;
|
7
|
+
const fs_1 = __importDefault(require("fs"));
|
8
|
+
const summoner_json_1 = __importDefault(require("../assets/summoner.json"));
|
9
|
+
function generateSummonerSpellsByName() {
|
10
|
+
const summonersByName = {
|
11
|
+
data: {},
|
12
|
+
version: '',
|
13
|
+
};
|
14
|
+
let summonerId;
|
15
|
+
for (summonerId in summoner_json_1.default.data) {
|
16
|
+
const summonerData = summoner_json_1.default.data[summonerId];
|
17
|
+
summonersByName.data[summonerData.name] = {
|
18
|
+
...summonerData,
|
19
|
+
};
|
20
|
+
}
|
21
|
+
summonersByName.version = summoner_json_1.default.version;
|
22
|
+
fs_1.default.writeFileSync(`src/generated/summonerByName.json`, JSON.stringify(summonersByName));
|
23
|
+
}
|
24
|
+
exports.generateSummonerSpellsByName = generateSummonerSpellsByName;
|
@@ -0,0 +1,11 @@
|
|
1
|
+
"use strict";
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
4
|
+
};
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
6
|
+
exports.getChampionKeyByName = void 0;
|
7
|
+
const championByName_json_1 = __importDefault(require("../generated/championByName.json"));
|
8
|
+
function getChampionKeyByName(name) {
|
9
|
+
return championByName_json_1.default.data[name].key;
|
10
|
+
}
|
11
|
+
exports.getChampionKeyByName = getChampionKeyByName;
|
@@ -0,0 +1,11 @@
|
|
1
|
+
"use strict";
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
4
|
+
};
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
6
|
+
exports.getChampionNameByKey = void 0;
|
7
|
+
const championByKey_json_1 = __importDefault(require("../generated/championByKey.json"));
|
8
|
+
function getChampionNameByKey(key) {
|
9
|
+
return championByKey_json_1.default.data[key].name;
|
10
|
+
}
|
11
|
+
exports.getChampionNameByKey = getChampionNameByKey;
|
@@ -0,0 +1,11 @@
|
|
1
|
+
"use strict";
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
4
|
+
};
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
6
|
+
exports.getItemKeyByName = void 0;
|
7
|
+
const itemByName_json_1 = __importDefault(require("../generated/itemByName.json"));
|
8
|
+
function getItemKeyByName(name) {
|
9
|
+
return itemByName_json_1.default.data[name].key;
|
10
|
+
}
|
11
|
+
exports.getItemKeyByName = getItemKeyByName;
|
@@ -0,0 +1,11 @@
|
|
1
|
+
"use strict";
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
4
|
+
};
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
6
|
+
exports.getItemNameByKey = void 0;
|
7
|
+
const item_json_1 = __importDefault(require("../assets/item.json"));
|
8
|
+
function getItemNameByKey(key) {
|
9
|
+
return item_json_1.default.data[key].name;
|
10
|
+
}
|
11
|
+
exports.getItemNameByKey = getItemNameByKey;
|
@@ -0,0 +1,21 @@
|
|
1
|
+
"use strict";
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
4
|
+
};
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
6
|
+
exports.getRuneIdByName = void 0;
|
7
|
+
const runesByName_json_1 = __importDefault(require("../generated/runesByName.json"));
|
8
|
+
const StatRunes_1 = require("../Constants/StatRunes");
|
9
|
+
const isStatRuneName_1 = require("./isStatRuneName");
|
10
|
+
function getRuneIdByName(name) {
|
11
|
+
if ((0, isStatRuneName_1.isStatRuneName)(name)) {
|
12
|
+
let statRuneId;
|
13
|
+
for (statRuneId in StatRunes_1.StatRunes) {
|
14
|
+
if (StatRunes_1.StatRunes[statRuneId] == name)
|
15
|
+
return statRuneId;
|
16
|
+
}
|
17
|
+
return '5001';
|
18
|
+
}
|
19
|
+
return runesByName_json_1.default[name].id;
|
20
|
+
}
|
21
|
+
exports.getRuneIdByName = getRuneIdByName;
|
@@ -0,0 +1,15 @@
|
|
1
|
+
"use strict";
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
4
|
+
};
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
6
|
+
exports.getRuneNameById = void 0;
|
7
|
+
const runesById_json_1 = __importDefault(require("../generated/runesById.json"));
|
8
|
+
const StatRunes_1 = require("../Constants/StatRunes");
|
9
|
+
const isStatRuneId_1 = require("./isStatRuneId");
|
10
|
+
function getRuneNameById(id) {
|
11
|
+
if ((0, isStatRuneId_1.isStatRuneId)(id))
|
12
|
+
return StatRunes_1.StatRunes[id];
|
13
|
+
return runesById_json_1.default[id].name;
|
14
|
+
}
|
15
|
+
exports.getRuneNameById = getRuneNameById;
|
@@ -0,0 +1,11 @@
|
|
1
|
+
"use strict";
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
4
|
+
};
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
6
|
+
exports.getSummonerSpellKeyByName = void 0;
|
7
|
+
const summonerByName_json_1 = __importDefault(require("../generated/summonerByName.json"));
|
8
|
+
function getSummonerSpellKeyByName(name) {
|
9
|
+
return summonerByName_json_1.default.data[name].key;
|
10
|
+
}
|
11
|
+
exports.getSummonerSpellKeyByName = getSummonerSpellKeyByName;
|
@@ -0,0 +1,11 @@
|
|
1
|
+
"use strict";
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
4
|
+
};
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
6
|
+
exports.getSummonerSpellNameByKey = void 0;
|
7
|
+
const summonerByKey_json_1 = __importDefault(require("../generated/summonerByKey.json"));
|
8
|
+
function getSummonerSpellNameByKey(key) {
|
9
|
+
return summonerByKey_json_1.default.data[key].name;
|
10
|
+
}
|
11
|
+
exports.getSummonerSpellNameByKey = getSummonerSpellNameByKey;
|
@@ -0,0 +1,10 @@
|
|
1
|
+
"use strict";
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
+
exports.isChampionKey = void 0;
|
4
|
+
const ChampionKeys_1 = require("../Constants/ChampionKeys");
|
5
|
+
function isChampionKey(key) {
|
6
|
+
if (ChampionKeys_1.ChampionKeys.includes(key))
|
7
|
+
return true;
|
8
|
+
return false;
|
9
|
+
}
|
10
|
+
exports.isChampionKey = isChampionKey;
|
@@ -0,0 +1,10 @@
|
|
1
|
+
"use strict";
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
+
exports.isChampionName = void 0;
|
4
|
+
const ChampionNames_1 = require("../Constants/ChampionNames");
|
5
|
+
function isChampionName(name) {
|
6
|
+
if (ChampionNames_1.ChampionNames.includes(name))
|
7
|
+
return true;
|
8
|
+
return false;
|
9
|
+
}
|
10
|
+
exports.isChampionName = isChampionName;
|
@@ -0,0 +1,10 @@
|
|
1
|
+
"use strict";
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
+
exports.isItemKey = void 0;
|
4
|
+
const ItemKeys_1 = require("../Constants/ItemKeys");
|
5
|
+
function isItemKey(key) {
|
6
|
+
if (ItemKeys_1.ItemKeys.includes(key))
|
7
|
+
return true;
|
8
|
+
return false;
|
9
|
+
}
|
10
|
+
exports.isItemKey = isItemKey;
|
@@ -0,0 +1,10 @@
|
|
1
|
+
"use strict";
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
+
exports.isItemName = void 0;
|
4
|
+
const ItemNames_1 = require("../Constants/ItemNames");
|
5
|
+
function isItemName(name) {
|
6
|
+
if (ItemNames_1.ItemNames.includes(name))
|
7
|
+
return true;
|
8
|
+
return false;
|
9
|
+
}
|
10
|
+
exports.isItemName = isItemName;
|
@@ -0,0 +1,10 @@
|
|
1
|
+
"use strict";
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
+
exports.isRuneId = void 0;
|
4
|
+
const RuneIds_1 = require("../Constants/RuneIds");
|
5
|
+
function isRuneId(id) {
|
6
|
+
if (RuneIds_1.RuneIds.includes(id))
|
7
|
+
return true;
|
8
|
+
return false;
|
9
|
+
}
|
10
|
+
exports.isRuneId = isRuneId;
|
@@ -0,0 +1,10 @@
|
|
1
|
+
"use strict";
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
+
exports.isRuneName = void 0;
|
4
|
+
const RuneNames_1 = require("../Constants/RuneNames");
|
5
|
+
function isRuneName(name) {
|
6
|
+
if (RuneNames_1.RuneNames.includes(name))
|
7
|
+
return true;
|
8
|
+
return false;
|
9
|
+
}
|
10
|
+
exports.isRuneName = isRuneName;
|
@@ -0,0 +1,10 @@
|
|
1
|
+
"use strict";
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
+
exports.isStatRuneId = void 0;
|
4
|
+
const StatRuneIds_1 = require("../Constants/StatRuneIds");
|
5
|
+
function isStatRuneId(id) {
|
6
|
+
if (StatRuneIds_1.StatRuneIds.includes(id))
|
7
|
+
return true;
|
8
|
+
return false;
|
9
|
+
}
|
10
|
+
exports.isStatRuneId = isStatRuneId;
|
@@ -0,0 +1,10 @@
|
|
1
|
+
"use strict";
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
+
exports.isStatRuneName = void 0;
|
4
|
+
const StatRuneNames_1 = require("../Constants/StatRuneNames");
|
5
|
+
function isStatRuneName(name) {
|
6
|
+
if (StatRuneNames_1.StatRuneNames.includes(name))
|
7
|
+
return true;
|
8
|
+
return false;
|
9
|
+
}
|
10
|
+
exports.isStatRuneName = isStatRuneName;
|
@@ -0,0 +1,10 @@
|
|
1
|
+
"use strict";
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
+
exports.isSummonerId = void 0;
|
4
|
+
const SummonerIds_1 = require("../Constants/SummonerIds");
|
5
|
+
function isSummonerId(id) {
|
6
|
+
if (SummonerIds_1.SummonerIds.includes(id))
|
7
|
+
return true;
|
8
|
+
return false;
|
9
|
+
}
|
10
|
+
exports.isSummonerId = isSummonerId;
|
@@ -0,0 +1,10 @@
|
|
1
|
+
"use strict";
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
+
exports.isSummonerKey = void 0;
|
4
|
+
const SummonerKeys_1 = require("../Constants/SummonerKeys");
|
5
|
+
function isSummonerKey(key) {
|
6
|
+
if (SummonerKeys_1.SummonerKeys.includes(key))
|
7
|
+
return true;
|
8
|
+
return false;
|
9
|
+
}
|
10
|
+
exports.isSummonerKey = isSummonerKey;
|
@@ -0,0 +1,10 @@
|
|
1
|
+
"use strict";
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
+
exports.isSummonerName = void 0;
|
4
|
+
const SummonerNames_1 = require("../Constants/SummonerNames");
|
5
|
+
function isSummonerName(name) {
|
6
|
+
if (SummonerNames_1.SummonerNames.includes(name))
|
7
|
+
return true;
|
8
|
+
return false;
|
9
|
+
}
|
10
|
+
exports.isSummonerName = isSummonerName;
|
@@ -0,0 +1,10 @@
|
|
1
|
+
"use strict";
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
+
exports.isSummonerSpellId = void 0;
|
4
|
+
const SummonerSpellIds_1 = require("../Constants/SummonerSpellIds");
|
5
|
+
function isSummonerSpellId(id) {
|
6
|
+
if (SummonerSpellIds_1.SummonerSpellIds.includes(id))
|
7
|
+
return true;
|
8
|
+
return false;
|
9
|
+
}
|
10
|
+
exports.isSummonerSpellId = isSummonerSpellId;
|
@@ -0,0 +1,10 @@
|
|
1
|
+
"use strict";
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
+
exports.isSummonerSpellKey = void 0;
|
4
|
+
const SummonerSpellKeys_1 = require("../Constants/SummonerSpellKeys");
|
5
|
+
function isSummonerSpellKey(key) {
|
6
|
+
if (SummonerSpellKeys_1.SummonerSpellKeys.includes(key))
|
7
|
+
return true;
|
8
|
+
return false;
|
9
|
+
}
|
10
|
+
exports.isSummonerSpellKey = isSummonerSpellKey;
|
@@ -0,0 +1,10 @@
|
|
1
|
+
"use strict";
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
+
exports.isSummonerSpellName = void 0;
|
4
|
+
const SummonerSpellNames_1 = require("../Constants/SummonerSpellNames");
|
5
|
+
function isSummonerSpellName(name) {
|
6
|
+
if (SummonerSpellNames_1.SummonerSpellNames.includes(name))
|
7
|
+
return true;
|
8
|
+
return false;
|
9
|
+
}
|
10
|
+
exports.isSummonerSpellName = isSummonerSpellName;
|
@@ -0,0 +1,10 @@
|
|
1
|
+
"use strict";
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
+
exports.isTreeRuneId = void 0;
|
4
|
+
const TreeRuneIds_1 = require("../Constants/TreeRuneIds");
|
5
|
+
function isTreeRuneId(id) {
|
6
|
+
if (TreeRuneIds_1.TreeRuneIds.includes(id))
|
7
|
+
return true;
|
8
|
+
return false;
|
9
|
+
}
|
10
|
+
exports.isTreeRuneId = isTreeRuneId;
|
@@ -0,0 +1,10 @@
|
|
1
|
+
"use strict";
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
+
exports.isTreeRuneName = void 0;
|
4
|
+
const TreeRuneNames_1 = require("../Constants/TreeRuneNames");
|
5
|
+
function isTreeRuneName(name) {
|
6
|
+
if (TreeRuneNames_1.TreeRuneNames.includes(name))
|
7
|
+
return true;
|
8
|
+
return false;
|
9
|
+
}
|
10
|
+
exports.isTreeRuneName = isTreeRuneName;
|
package/dist/index.d.ts
CHANGED
@@ -17232,10 +17232,14 @@ export { ItemKeys } from './Constants/ItemKeys';
|
|
17232
17232
|
export { ItemNames } from './Constants/ItemNames';
|
17233
17233
|
export { RuneIds } from './Constants/RuneIds';
|
17234
17234
|
export { RuneNames } from './Constants/RuneNames';
|
17235
|
+
export { StatRuneIds } from './Constants/StatRuneIds';
|
17236
|
+
export { StatRuneNames } from './Constants/StatRuneNames';
|
17235
17237
|
export { StatRunes } from './Constants/StatRunes';
|
17236
|
-
export {
|
17237
|
-
export {
|
17238
|
-
export {
|
17238
|
+
export { SummonerSpellIds } from './Constants/SummonerSpellIds';
|
17239
|
+
export { SummonerSpellKeys } from './Constants/SummonerSpellKeys';
|
17240
|
+
export { SummonerSpellNames } from './Constants/SummonerSpellNames';
|
17241
|
+
export { TreeRuneIds } from './Constants/TreeRuneIds';
|
17242
|
+
export { TreeRuneNames } from './Constants/TreeRuneNames';
|
17239
17243
|
export declare const championByKey: {
|
17240
17244
|
data: {
|
17241
17245
|
"1": {
|
@@ -43393,5 +43397,26 @@ export declare const summonerByName: {
|
|
43393
43397
|
};
|
43394
43398
|
version: string;
|
43395
43399
|
};
|
43400
|
+
export { getChampionKeyByName } from './Helpers/getChampionKeyByName';
|
43401
|
+
export { getChampionNameByKey } from './Helpers/getChampionNameByKey';
|
43402
|
+
export { getItemKeyByName } from './Helpers/getItemKeyByName';
|
43403
|
+
export { getItemNameByKey } from './Helpers/getItemNameByKey';
|
43404
|
+
export { getRuneIdByName } from './Helpers/getRuneIdByName';
|
43405
|
+
export { getRuneNameById } from './Helpers/getRuneNameById';
|
43406
|
+
export { getSummonerSpellKeyByName } from './Helpers/getSummonerSpellKeyByName';
|
43407
|
+
export { getSummonerSpellNameByKey } from './Helpers/getSummonerSpellNameByKey';
|
43408
|
+
export { isChampionKey } from './Helpers/isChampionKey';
|
43409
|
+
export { isChampionName } from './Helpers/isChampionName';
|
43410
|
+
export { isItemKey } from './Helpers/isItemKey';
|
43411
|
+
export { isItemName } from './Helpers/isItemName';
|
43412
|
+
export { isRuneId } from './Helpers/isRuneId';
|
43413
|
+
export { isRuneName } from './Helpers/isRuneName';
|
43414
|
+
export { isStatRuneId } from './Helpers/isStatRuneId';
|
43415
|
+
export { isStatRuneName } from './Helpers/isStatRuneName';
|
43416
|
+
export { isSummonerSpellId } from './Helpers/isSummonerSpellId';
|
43417
|
+
export { isSummonerSpellKey } from './Helpers/isSummonerSpellKey';
|
43418
|
+
export { isSummonerSpellName } from './Helpers/isSummonerSpellName';
|
43419
|
+
export { isTreeRuneId } from './Helpers/isTreeRuneId';
|
43420
|
+
export { isTreeRuneName } from './Helpers/isTreeRuneName';
|
43396
43421
|
export * from './types';
|
43397
43422
|
export * from './types/Meta';
|
package/dist/index.js
CHANGED
@@ -17,7 +17,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
17
17
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
18
18
|
};
|
19
19
|
Object.defineProperty(exports, "__esModule", { value: true });
|
20
|
-
exports.summonerByName = exports.summonerByKey = exports.runesByName = exports.runesById = exports.itemByName = exports.championByName = exports.championByKey = exports.
|
20
|
+
exports.isTreeRuneName = exports.isTreeRuneId = exports.isSummonerSpellName = exports.isSummonerSpellKey = exports.isSummonerSpellId = exports.isStatRuneName = exports.isStatRuneId = exports.isRuneName = exports.isRuneId = exports.isItemName = exports.isItemKey = exports.isChampionName = exports.isChampionKey = exports.getSummonerSpellNameByKey = exports.getSummonerSpellKeyByName = exports.getRuneNameById = exports.getRuneIdByName = exports.getItemNameByKey = exports.getItemKeyByName = exports.getChampionNameByKey = exports.getChampionKeyByName = exports.summonerByName = exports.summonerByKey = exports.runesByName = exports.runesById = exports.itemByName = exports.championByName = exports.championByKey = exports.TreeRuneNames = exports.TreeRuneIds = exports.SummonerSpellNames = exports.SummonerSpellKeys = exports.SummonerSpellIds = exports.StatRunes = exports.StatRuneNames = exports.StatRuneIds = exports.RuneNames = exports.RuneIds = exports.ItemNames = exports.ItemKeys = exports.DDPaths = exports.ChampionNames = exports.ChampionKeys = exports.summoner = exports.runesReforged = exports.item = exports.champion = void 0;
|
21
21
|
const champion_json_1 = __importDefault(require("./assets/champion.json"));
|
22
22
|
const item_json_1 = __importDefault(require("./assets/item.json"));
|
23
23
|
const runesReforged_json_1 = __importDefault(require("./assets/runesReforged.json"));
|
@@ -40,14 +40,22 @@ var RuneIds_1 = require("./Constants/RuneIds");
|
|
40
40
|
Object.defineProperty(exports, "RuneIds", { enumerable: true, get: function () { return RuneIds_1.RuneIds; } });
|
41
41
|
var RuneNames_1 = require("./Constants/RuneNames");
|
42
42
|
Object.defineProperty(exports, "RuneNames", { enumerable: true, get: function () { return RuneNames_1.RuneNames; } });
|
43
|
+
var StatRuneIds_1 = require("./Constants/StatRuneIds");
|
44
|
+
Object.defineProperty(exports, "StatRuneIds", { enumerable: true, get: function () { return StatRuneIds_1.StatRuneIds; } });
|
45
|
+
var StatRuneNames_1 = require("./Constants/StatRuneNames");
|
46
|
+
Object.defineProperty(exports, "StatRuneNames", { enumerable: true, get: function () { return StatRuneNames_1.StatRuneNames; } });
|
43
47
|
var StatRunes_1 = require("./Constants/StatRunes");
|
44
48
|
Object.defineProperty(exports, "StatRunes", { enumerable: true, get: function () { return StatRunes_1.StatRunes; } });
|
45
|
-
var
|
46
|
-
Object.defineProperty(exports, "
|
47
|
-
var
|
48
|
-
Object.defineProperty(exports, "
|
49
|
-
var
|
50
|
-
Object.defineProperty(exports, "
|
49
|
+
var SummonerSpellIds_1 = require("./Constants/SummonerSpellIds");
|
50
|
+
Object.defineProperty(exports, "SummonerSpellIds", { enumerable: true, get: function () { return SummonerSpellIds_1.SummonerSpellIds; } });
|
51
|
+
var SummonerSpellKeys_1 = require("./Constants/SummonerSpellKeys");
|
52
|
+
Object.defineProperty(exports, "SummonerSpellKeys", { enumerable: true, get: function () { return SummonerSpellKeys_1.SummonerSpellKeys; } });
|
53
|
+
var SummonerSpellNames_1 = require("./Constants/SummonerSpellNames");
|
54
|
+
Object.defineProperty(exports, "SummonerSpellNames", { enumerable: true, get: function () { return SummonerSpellNames_1.SummonerSpellNames; } });
|
55
|
+
var TreeRuneIds_1 = require("./Constants/TreeRuneIds");
|
56
|
+
Object.defineProperty(exports, "TreeRuneIds", { enumerable: true, get: function () { return TreeRuneIds_1.TreeRuneIds; } });
|
57
|
+
var TreeRuneNames_1 = require("./Constants/TreeRuneNames");
|
58
|
+
Object.defineProperty(exports, "TreeRuneNames", { enumerable: true, get: function () { return TreeRuneNames_1.TreeRuneNames; } });
|
51
59
|
const championByKey_json_1 = __importDefault(require("./generated/championByKey.json"));
|
52
60
|
const championByName_json_1 = __importDefault(require("./generated/championByName.json"));
|
53
61
|
const itemByName_json_1 = __importDefault(require("./generated/itemByName.json"));
|
@@ -62,5 +70,47 @@ exports.runesById = runesById_json_1.default;
|
|
62
70
|
exports.runesByName = runesByName_json_1.default;
|
63
71
|
exports.summonerByKey = summonerByKey_json_1.default;
|
64
72
|
exports.summonerByName = summonerByName_json_1.default;
|
73
|
+
var getChampionKeyByName_1 = require("./Helpers/getChampionKeyByName");
|
74
|
+
Object.defineProperty(exports, "getChampionKeyByName", { enumerable: true, get: function () { return getChampionKeyByName_1.getChampionKeyByName; } });
|
75
|
+
var getChampionNameByKey_1 = require("./Helpers/getChampionNameByKey");
|
76
|
+
Object.defineProperty(exports, "getChampionNameByKey", { enumerable: true, get: function () { return getChampionNameByKey_1.getChampionNameByKey; } });
|
77
|
+
var getItemKeyByName_1 = require("./Helpers/getItemKeyByName");
|
78
|
+
Object.defineProperty(exports, "getItemKeyByName", { enumerable: true, get: function () { return getItemKeyByName_1.getItemKeyByName; } });
|
79
|
+
var getItemNameByKey_1 = require("./Helpers/getItemNameByKey");
|
80
|
+
Object.defineProperty(exports, "getItemNameByKey", { enumerable: true, get: function () { return getItemNameByKey_1.getItemNameByKey; } });
|
81
|
+
var getRuneIdByName_1 = require("./Helpers/getRuneIdByName");
|
82
|
+
Object.defineProperty(exports, "getRuneIdByName", { enumerable: true, get: function () { return getRuneIdByName_1.getRuneIdByName; } });
|
83
|
+
var getRuneNameById_1 = require("./Helpers/getRuneNameById");
|
84
|
+
Object.defineProperty(exports, "getRuneNameById", { enumerable: true, get: function () { return getRuneNameById_1.getRuneNameById; } });
|
85
|
+
var getSummonerSpellKeyByName_1 = require("./Helpers/getSummonerSpellKeyByName");
|
86
|
+
Object.defineProperty(exports, "getSummonerSpellKeyByName", { enumerable: true, get: function () { return getSummonerSpellKeyByName_1.getSummonerSpellKeyByName; } });
|
87
|
+
var getSummonerSpellNameByKey_1 = require("./Helpers/getSummonerSpellNameByKey");
|
88
|
+
Object.defineProperty(exports, "getSummonerSpellNameByKey", { enumerable: true, get: function () { return getSummonerSpellNameByKey_1.getSummonerSpellNameByKey; } });
|
89
|
+
var isChampionKey_1 = require("./Helpers/isChampionKey");
|
90
|
+
Object.defineProperty(exports, "isChampionKey", { enumerable: true, get: function () { return isChampionKey_1.isChampionKey; } });
|
91
|
+
var isChampionName_1 = require("./Helpers/isChampionName");
|
92
|
+
Object.defineProperty(exports, "isChampionName", { enumerable: true, get: function () { return isChampionName_1.isChampionName; } });
|
93
|
+
var isItemKey_1 = require("./Helpers/isItemKey");
|
94
|
+
Object.defineProperty(exports, "isItemKey", { enumerable: true, get: function () { return isItemKey_1.isItemKey; } });
|
95
|
+
var isItemName_1 = require("./Helpers/isItemName");
|
96
|
+
Object.defineProperty(exports, "isItemName", { enumerable: true, get: function () { return isItemName_1.isItemName; } });
|
97
|
+
var isRuneId_1 = require("./Helpers/isRuneId");
|
98
|
+
Object.defineProperty(exports, "isRuneId", { enumerable: true, get: function () { return isRuneId_1.isRuneId; } });
|
99
|
+
var isRuneName_1 = require("./Helpers/isRuneName");
|
100
|
+
Object.defineProperty(exports, "isRuneName", { enumerable: true, get: function () { return isRuneName_1.isRuneName; } });
|
101
|
+
var isStatRuneId_1 = require("./Helpers/isStatRuneId");
|
102
|
+
Object.defineProperty(exports, "isStatRuneId", { enumerable: true, get: function () { return isStatRuneId_1.isStatRuneId; } });
|
103
|
+
var isStatRuneName_1 = require("./Helpers/isStatRuneName");
|
104
|
+
Object.defineProperty(exports, "isStatRuneName", { enumerable: true, get: function () { return isStatRuneName_1.isStatRuneName; } });
|
105
|
+
var isSummonerSpellId_1 = require("./Helpers/isSummonerSpellId");
|
106
|
+
Object.defineProperty(exports, "isSummonerSpellId", { enumerable: true, get: function () { return isSummonerSpellId_1.isSummonerSpellId; } });
|
107
|
+
var isSummonerSpellKey_1 = require("./Helpers/isSummonerSpellKey");
|
108
|
+
Object.defineProperty(exports, "isSummonerSpellKey", { enumerable: true, get: function () { return isSummonerSpellKey_1.isSummonerSpellKey; } });
|
109
|
+
var isSummonerSpellName_1 = require("./Helpers/isSummonerSpellName");
|
110
|
+
Object.defineProperty(exports, "isSummonerSpellName", { enumerable: true, get: function () { return isSummonerSpellName_1.isSummonerSpellName; } });
|
111
|
+
var isTreeRuneId_1 = require("./Helpers/isTreeRuneId");
|
112
|
+
Object.defineProperty(exports, "isTreeRuneId", { enumerable: true, get: function () { return isTreeRuneId_1.isTreeRuneId; } });
|
113
|
+
var isTreeRuneName_1 = require("./Helpers/isTreeRuneName");
|
114
|
+
Object.defineProperty(exports, "isTreeRuneName", { enumerable: true, get: function () { return isTreeRuneName_1.isTreeRuneName; } });
|
65
115
|
__exportStar(require("./types"), exports);
|
66
116
|
__exportStar(require("./types/Meta"), exports);
|
@@ -5,15 +5,15 @@ const generateChampionsByName_1 = require("../Helpers/generateChampionsByName");
|
|
5
5
|
const generateItemsByName_1 = require("../Helpers/generateItemsByName");
|
6
6
|
const generateRunesById_1 = require("../Helpers/generateRunesById");
|
7
7
|
const generateRunesByName_1 = require("../Helpers/generateRunesByName");
|
8
|
-
const
|
9
|
-
const
|
8
|
+
const generateSummonerSpellsByKey_1 = require("../Helpers/generateSummonerSpellsByKey");
|
9
|
+
const generateSummonerSpellsByName_1 = require("../Helpers/generateSummonerSpellsByName");
|
10
10
|
const generateJSONs = () => {
|
11
11
|
(0, generateChampionsByKey_1.generateChampionsByKey)();
|
12
12
|
(0, generateChampionsByName_1.generateChampionsByName)();
|
13
13
|
(0, generateItemsByName_1.generateItemsByName)();
|
14
14
|
(0, generateRunesById_1.generateRunesById)();
|
15
15
|
(0, generateRunesByName_1.generateRunesByName)();
|
16
|
-
(0,
|
17
|
-
(0,
|
16
|
+
(0, generateSummonerSpellsByKey_1.generateSummonerSpellsByKey)();
|
17
|
+
(0, generateSummonerSpellsByName_1.generateSummonerSpellsByName)();
|
18
18
|
};
|
19
19
|
generateJSONs();
|
package/dist/types/index.d.ts
CHANGED
@@ -12,11 +12,15 @@ export declare type ChampionKey = keyof typeof championByKey.data;
|
|
12
12
|
export declare type ChampionName = keyof typeof championByName.data;
|
13
13
|
export declare type ItemKey = keyof typeof item.data;
|
14
14
|
export declare type ItemName = keyof typeof itemByName.data;
|
15
|
-
export declare type
|
16
|
-
export declare type
|
17
|
-
export declare type
|
18
|
-
export declare type RuneId =
|
19
|
-
export declare type RuneName =
|
15
|
+
export declare type SummonerSpellId = keyof typeof summoner.data;
|
16
|
+
export declare type SummonerSpellKey = keyof typeof summonerByKey.data;
|
17
|
+
export declare type SummonerSpellName = keyof typeof summonerByName.data;
|
18
|
+
export declare type RuneId = TreeRuneId | StatRuneId;
|
19
|
+
export declare type RuneName = TreeRuneName | StatRuneName;
|
20
|
+
export declare type TreeRuneId = keyof typeof runesById;
|
21
|
+
export declare type TreeRuneName = keyof typeof runesByName;
|
22
|
+
export declare type StatRuneId = keyof typeof StatRunes;
|
23
|
+
export declare type StatRuneName = typeof StatRunes[keyof typeof StatRunes];
|
20
24
|
export declare type XP = number;
|
21
25
|
export declare type Minute = number;
|
22
26
|
export declare type TPosition = 'TOP' | 'JUNGLE' | 'MIDDLE' | 'BOTTOM' | 'UTILITY';
|
package/package.json
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
{
|
2
2
|
"name": "lol-constants",
|
3
|
-
"version": "0.
|
4
|
-
"description": "League of Legends constants and data resources, such as champion, item, runes reforged, summoner.",
|
3
|
+
"version": "0.9.2",
|
4
|
+
"description": "League of Legends constants and data resources, such as champion, item, runes reforged, summoner spells.",
|
5
5
|
"main": "dist/index.js",
|
6
6
|
"types": "dist/index.d.ts",
|
7
7
|
"license": "MIT",
|