lol-constants 0.7.1 → 0.9.0
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/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/index.d.ts +10 -6
- package/dist/index.js +21 -13
- 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,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;
|
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": {
|
@@ -43399,8 +43403,8 @@ export { isItemKey } from './Helpers/isItemKey';
|
|
43399
43403
|
export { isItemName } from './Helpers/isItemName';
|
43400
43404
|
export { isRuneId } from './Helpers/isRuneId';
|
43401
43405
|
export { isRuneName } from './Helpers/isRuneName';
|
43402
|
-
export {
|
43403
|
-
export {
|
43404
|
-
export {
|
43406
|
+
export { isSummonerSpellId } from './Helpers/isSummonerSpellId';
|
43407
|
+
export { isSummonerSpellKey } from './Helpers/isSummonerSpellKey';
|
43408
|
+
export { isSummonerSpellName } from './Helpers/isSummonerSpellName';
|
43405
43409
|
export * from './types';
|
43406
43410
|
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.
|
20
|
+
exports.isSummonerSpellName = exports.isSummonerSpellKey = exports.isSummonerSpellId = exports.isRuneName = exports.isRuneId = exports.isItemName = exports.isItemKey = exports.isChampionName = exports.isChampionKey = 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"));
|
@@ -74,11 +82,11 @@ var isRuneId_1 = require("./Helpers/isRuneId");
|
|
74
82
|
Object.defineProperty(exports, "isRuneId", { enumerable: true, get: function () { return isRuneId_1.isRuneId; } });
|
75
83
|
var isRuneName_1 = require("./Helpers/isRuneName");
|
76
84
|
Object.defineProperty(exports, "isRuneName", { enumerable: true, get: function () { return isRuneName_1.isRuneName; } });
|
77
|
-
var
|
78
|
-
Object.defineProperty(exports, "
|
79
|
-
var
|
80
|
-
Object.defineProperty(exports, "
|
81
|
-
var
|
82
|
-
Object.defineProperty(exports, "
|
85
|
+
var isSummonerSpellId_1 = require("./Helpers/isSummonerSpellId");
|
86
|
+
Object.defineProperty(exports, "isSummonerSpellId", { enumerable: true, get: function () { return isSummonerSpellId_1.isSummonerSpellId; } });
|
87
|
+
var isSummonerSpellKey_1 = require("./Helpers/isSummonerSpellKey");
|
88
|
+
Object.defineProperty(exports, "isSummonerSpellKey", { enumerable: true, get: function () { return isSummonerSpellKey_1.isSummonerSpellKey; } });
|
89
|
+
var isSummonerSpellName_1 = require("./Helpers/isSummonerSpellName");
|
90
|
+
Object.defineProperty(exports, "isSummonerSpellName", { enumerable: true, get: function () { return isSummonerSpellName_1.isSummonerSpellName; } });
|
83
91
|
__exportStar(require("./types"), exports);
|
84
92
|
__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.0",
|
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",
|