ORDER

tcmts.cli.test.e2e.traces.ORDER · #2zh7ynqb · term · runs anywhere

The shop's order: as it is, or slowed by ms of work.

export const ORDER = (ms: number) => `// tcm: namespace shop
export function order(xs: string[]): string[] {
  ${ms ? `const end = Date.now() + ${ms};\n  while (Date.now() < end) {}\n  ` : ""}return [...xs].sort();
}
`

used by