INNER CODE UNIT · JavaScript

pattern

Legit-Labs/legitify · index.js:142

  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");
    args.push(scorecard);

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…