UNPKG

isaacscript-common

Version:

Helper functions and features for IsaacScript mods.

20 lines (19 loc) 794 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.TRINKET_NAME_TO_TYPE_MAP = void 0; const string_1 = require("../functions/string"); const trinketNames_1 = require("../objects/trinketNames"); /** * Maps trinket names to the values of the `TrinketType` enum. * * For a mapping of `TrinketType` to name, see the `TRINKET_NAMES` constant. */ exports.TRINKET_NAME_TO_TYPE_MAP = (() => { const trinketNameToTypeMap = new Map(); for (const [trinketTypeString, name] of Object.entries(trinketNames_1.TRINKET_NAMES)) { const trinketType = trinketTypeString; const simpleString = (0, string_1.removeNonAlphanumericCharacters)(name); trinketNameToTypeMap.set(simpleString, trinketType); } return trinketNameToTypeMap; })();