clip

tcmts.cli.package_pages.clip · #fj6iuard · term · runs anywhere

export const clip = (text: string) => {
  const lines = text.split("\n");
  return lines.length > 30 ? [...lines.slice(0, 30), "  …"].join("\n") : text;
}

used by