← Files Plugin EvalARCHIVED FILE

fixtures/ts-python-sample/src/sample.ts

541 Bytes · Sep 30, 2026 · 23:18 UTC

↓ Download file

export function choosePath(items: string[], includeArchived: boolean, preferFast: boolean): string[] {
  const next: string[] = [];
  for (const item of items) {
    if (!item) {
      continue;
    }
    if (includeArchived || !item.startsWith("archived:")) {
      if (preferFast && item.includes("fast")) {
        next.push(item.toUpperCase());
      } else if (!preferFast && item.includes("slow")) {
        next.push(item.toLowerCase());
      } else if (item.length > 3) {
        next.push(item);
      }
    }
  }
  return next;
}

SHA-256: b75d7dff906987ae317e6613ce76b8a02ecbd6d1c1eb5a92a456db0d168dd829