INNER CODE UNIT · TypeScript

hiddenWidth

akirarika/milkio · packages/cookbook/src/index.ts:90

    const hiddenWidth = Math.max(...hidden.map((c) => c.commands[0].length));
    for (const c of hidden) {
      console.log(`  ${c.commands[0].padEnd(hiddenWidth)}   (aliases: ${c.commands.join(", ")})`);
    }
    console.log("");
    console.log("Docs: https://github.com/akirarika/co");
    exit(0);
  }

  const packageJson = (await exists(join(cwd(), "package.json"))) ? JSON.parse(await readFile(join(cwd(), "package.json"), "utf-8")) : undefined;

  if (params.command === "index") {
    const commands = [
      {
        name: "<cancel>",
        value: "<cancel>",
        description: "built-in",
      },

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…