UNPKG

tf2-item-format

Version:
22 lines 648 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.default = default_1; function default_1(name) { const hauntedCount = name.match(/Haunted /g); return (!!hauntedCount && (hauntedCount.length === 2 || !isHauntedException(name))); } const HAUNTED_EXCEPTIONS = [ 'Haunted Hat', 'Haunted Ghosts', 'Haunted Phantasm', 'Haunted Metal Scrap', 'Haunted Kraken', 'Haunted Forever', 'Haunted Wick', 'Haunted Cremation', ]; function isHauntedException(name) { return HAUNTED_EXCEPTIONS.some((exception) => name.includes(exception)); } //# sourceMappingURL=isHaunted.js.map