INNER CODE UNIT · JavaScript
breakStringToParams
Legit-Labs/legitify · index.js:141
function breakStringToParams(str) {
const pattern = /(-{1,2}\S+)(?:\s+((?!\s*-).+?)(?=\s+-{1,2}|\s*$))?/g;
const matches = str.matchAll(pattern)
let args = []
for (const m of matches) {
args.push(m[1], m[2])
}
return args
}
function generateAnalyzeArgs(repo, owner) {
let args = [];
const scorecard = process.env["scorecard"];
if (scorecard === "yes" || scorecard === "verbose") {
args.push("--scorecard");