UNPKG

tf2-item-format

Version:
24 lines 649 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.isSpell = isSpell; exports.getSpell = getSpell; /** * Checks if description includes spell * @param {object} description * @return {boolean} */ function isSpell(description) { return (description.value.startsWith('Halloween: ') && description.color === '7ea9d1'); } /** * Gets spell from description * @param {object} description * @return {string} */ function getSpell(description) { return description.value .replace('Halloween: ', '') .replace(' (spell only active during event)', ''); } //# sourceMappingURL=spell.js.map