UNPKG

@yankeeinlondon/promptly

Version:

An automation tool for prompting your favorite LLMs

14 lines (10 loc) 265 B
import { stripLeading } from "inferred-types"; import { basename, extname } from "pathe"; export function codeBlock(text: string, filename: string) { return ` ##### ${basename(filename)} \`\`\`${stripLeading(extname(filename), ".")} ${text.trim()} \`\`\` `; }