snyk-docker-plugin
Version:
Snyk CLI docker plugin
19 lines • 741 B
JavaScript
Object.defineProperty(exports, "__esModule", { value: true });
exports.findProvidesExtras = void 0;
// https://packaging.python.org/en/latest/specifications/core-metadata/#provides-extra-multiple-use
const PROVIDES_EXTRA = "Provides-Extra:";
// given the lines of a METADATA file, find all 'Provides-Extra' names
function findProvidesExtras(lines) {
const extras = new Set();
for (const line of lines) {
const l = line.trim();
if (l.startsWith(PROVIDES_EXTRA)) {
const extra = l.substring(PROVIDES_EXTRA.length).trim();
extras.add(extra);
}
}
return Array.from(extras);
}
exports.findProvidesExtras = findProvidesExtras;
//# sourceMappingURL=provides-extra.js.map
;