npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

convert-md-to-bbcode

v1.0.0

Published

Convert Markdown to BBCode

Readme

convert-md-to-bbcode 📊

cli-available node version npm version downloads count size license github-ci typescript

🔨 Convert Markdown to BBCode.

Give a ⭐️ if this project helped you!

Motivation

Markdown became the default format for documentation, but plenty of platforms still do not render it - they accept BBCode instead. If you keep your documents in Markdown (e.g. next to the source files in a repository), publishing them there means converting the same text over and over by hand. This tool does that conversion in one command.

A typical example is TradingView, whose script publication descriptions accept a small set of BBCode tags (documented in the Pine Script docs): [b], [i], [s], [pine], [list], [list=1], [*], [quote], [url=...], [image] - and the core of that set works on any classic BBCode forum.

Preview 🎉

convert-md-to-bbcode demo

Where BBCode is required 📍

A surprising number of platforms still speak BBCode only:

[!NOTE] The emitted dialect comes from TradingView, but [b], [i], [s], [url=...], [list] and [quote] are the common BBCode core, so the output works on classic forums too. The differences are [image] (many engines use [img] instead) and [pine] (TradingView-only; other engines use [code]).

Features ✨

  • 🔄 Converts bold, italic, strikethrough, links and images to their BBCode tags
  • ⌨️ Maps inline code to [b] (the dialect has no inline-code tag)
  • 🧱 Renders headings as plain [b] lines (BBCode has no headers)
  • 🎨 Optional --pinecoders style renders ## headings as █ [b]SECTION[/b] lines and drops the first H1 (the PineCoders publication convention; the publish form has its own title field, --keep-h1 restores it)
  • 📐 Puts fenced code blocks and tables into [pine] blocks, so monospace keeps ASCII diagrams and columns aligned
  • 📋 Preserves list nesting with nested [list] / [list=1] tags
  • 🔗 Degrades relative links to plain text (they would point nowhere outside the repository)
  • 📦 Zero dependencies
  • 📘 Ships TypeScript types and a programmatic API

Usage

Installation:

npm install convert-md-to-bbcode
import { convertMarkdownToBBCode } from 'convert-md-to-bbcode';

// Faithful conversion: every heading becomes a plain [b] line
const bbcode = convertMarkdownToBBCode('# Title\n\n**Bold** text');

// PineCoders publication style: `█ [b]SECTION[/b]` headings, first H1 dropped
const description = convertMarkdownToBBCode('# Title\n\n**Bold** text', {
  style: 'pinecoders',
});

CLI

Try it without installing anything:

npx convert-md-to-bbcode docs/indicator.md

Or install globally:

npm install -g convert-md-to-bbcode
convert-md-to-bbcode docs/indicator.md                  # BBCode to stdout
convert-md-to-bbcode docs/indicator.md --out desc.txt   # write to a file
cat docs/indicator.md | convert-md-to-bbcode            # read from stdin
convert-md-to-bbcode docs/indicator.md --pinecoders     # PineCoders publication style
convert-md-to-bbcode docs/indicator.md --pinecoders --keep-h1   # ...but keep the top H1

Paste-ready: send the result straight to the clipboard and paste it into the publish form:

convert-md-to-bbcode docs/indicator.md | pbcopy                       # macOS
convert-md-to-bbcode docs/indicator.md | xclip -selection clipboard   # Linux (X11)
convert-md-to-bbcode docs/indicator.md | wl-copy                      # Linux (Wayland)

Development 🛠️

npm install
npm test             # unit tests
npm run coverage     # unit tests with a coverage report
npm run lint         # ESLint
npm run format       # Prettier over the whole repository

🤝 Contributing

Contributions, issues and feature requests are welcome! Feel free to check issues page.

License

The MIT License @ 2026