Stx

A syntax highlighter for the terminal.

Usage

import { defaultTheme, highlight } from "https://stx.deno.dev/{version}";
import "https://stx.deno.dev/{version}/components/typescript.ts";

const code = `
import { defaultTheme, highlight } from "https://stx.deno.dev/{version}";
import "https://stx.deno.dev/{version}/components/typescript.ts";

const code = "console.log('hello world')";

console.log(highlight(defaultTheme));
`;

console.log(highlight(defaultTheme));