UNPKG

tf2-item-format

Version:
11 lines 349 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.default = getLevel; function getLevel(econ) { const [, lvlString] = econ.item.type.match(/^Level (\d+)/) || []; if (!lvlString) return -1; const lvl = parseInt(lvlString); return isNaN(lvl) ? -1 : lvl; } //# sourceMappingURL=getLevel.js.map