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

formatter-chatgpt-telegram

v1.0.0

Published

A package for converting markdown to HTML for chat Telegram bots

Readme

Ci Status Npm version

ChatGPT Markdown to Telegram HTML Converter - TypeScript

This library is convertation to Typescript of Python version formatter-chatgpt-telegram originally crafted by @Latand

A TypeScript library for converting Markdown to HTML format supported by the Telegram Bot API.

Installation

npm install formatter-chatgpt-telegram

Usage

import telegramFormat from 'formatter-chatgpt-telegram';

// Your Markdown text
const markdown = `
# Heading

This is _italic_ and **bold** text.

\`\`\`python
def hello():
    print("Hello, world!")
\`\`\`

- First list item
- Second list item
`;

// Convert to HTML compatible with Telegram
const html = telegramFormat(markdown);
console.log(html);

Supported Syntax

Code Blocks

Multiline Code Blocks with Language Specification

```python
def hello_world():
    print("Hello, World!")
```

Will be converted to:

<pre><code class="language-python">def hello_world():
    print("Hello, World!")</code></pre>

Inline Code Blocks

Here is inline `code`.

Will be converted to:

Here is inline <code>code</code>.

Text Styling

| Markdown | HTML | Result in Telegram | | ------------------------ | ----------------------------------------- | --------------------------------------- | | **bold text** | <b>bold text</b> | bold text | | __underlined__ | <u>underlined</u> | underlined | | *italic* or _italic_ | <i>italic</i> | italic | | ***bold and italic*** | <b><i>bold and italic</i></b> | bold and italic | | ___underline italic___ | <u><i>underline italic</i></u> | underline italic | | ~~strikethrough~~ | <s>strikethrough</s> | ~~strikethrough~~ | | \|\|spoiler\|\| | <span class="tg-spoiler">spoiler</span> | spoiler |

Headers

Headers are converted to bold text:

# Header 1

## Header 2

### Header 3

Will be converted to:

<b>Header 1</b>
<b>Header 2</b>
<b>Header 3</b>

Lists

Unordered lists using * or -:

- First item
- Second item

Will be converted to:

• First item
• Second item

Links

Links are converted to HTML <a> tags:

[Link text](https://example.com)

Will be converted to:

<a href="https://example.com">Link text</a>

Blockquotes

> This is a quote
> spanning multiple lines

Will be converted to:

<blockquote>This is a quote spanning multiple lines</blockquote>

Expandable Blockquotes

**> This is an expandable quote
**> spanning multiple lines

Will be converted to:

<blockquote expandable>This is an expandable quote spanning multiple lines</blockquote>

Development

npm run format # code fomatting
npm run test # testing

Active maintenance with care and ❤️.

Feel free to send a PR.

License

MIT