UNPKG

oclif-plugin-completion

Version:
18 lines (17 loc) 480 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.getBinAliases = void 0; function getBinAliases({ bin, pjson, }) { const aliases = []; if (!pjson.bin) { return aliases; } const binPath = pjson.bin[bin]; for (const [name, path] of Object.entries(pjson.bin)) { if (name !== bin && path === binPath) { aliases.push(name); } } return aliases; } exports.getBinAliases = getBinAliases;