bun

Created: by Pradeep GowdaUpdated:Aug 01, 2024Tagged: bun · javascript · typescript .

bun is a JavaScript runtime.

Run run a .js or a .ts script:

//hello.ts
import markdown from "markdown";

function foo () {
  return markdown.parse('**hello** world');
}

console.log(foo())

First install the deps: $bun install markdown. (Which also installs a binary md2html to where exactly I don’t know.)

Run the script:

    $ bun hello.ts
    <p><strong>hello</strong> world</p>