@warriorjs/cli
Version:
WarriorJS command line
18 lines (15 loc) • 443 B
JavaScript
Object.defineProperty(exports, "__esModule", {
value: true
});
const towerIdRegex = /(?:@warriorjs\/|warriorjs-)tower-(.+)/;
/**
* Returns the identifier of the tower based on the package name.
*
* @param {string} towerPackageName The package name of the tower.
*/
function getTowerId(towerPackageName) {
return towerPackageName.match(towerIdRegex)[1];
}
exports.default = getTowerId;
module.exports = exports.default;
;