Skip to content

armgit / cindy

Public Imported from GitHub
0

Consider it done. The open-source AI agent that works out of the box · 想到,就能做到。开源、开箱即用的 AI Agent。

566 B
Raw Blame
export function parseVitestCliExclude(args: readonly string[]): string[] {
  const patterns: string[] = [];

  for (let index = 0; index < args.length; index += 1) {
    const arg = args[index];
    if (arg === '--exclude') {
      const pattern = args[index + 1];
      if (pattern && !pattern.startsWith('--')) {
        patterns.push(pattern);
        index += 1;
      }
      continue;
    }
    if (arg.startsWith('--exclude=')) {
      const pattern = arg.slice('--exclude='.length);
      if (pattern) patterns.push(pattern);
    }
  }

  return patterns;
}