tf2-item-format
Version:
Format's TF2 items like backpack.tf does
24 lines • 649 B
JavaScript
;
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