
Security News
Axios Maintainer Confirms Social Engineering Attack Behind npm Compromise
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.
@flla/telegram-format
Advanced tools
Format Telegram message texts with Markdown or HTML
This library abstracts the formatting options for you.
Node.js:
npm install @flla/telegram-format
Deno:
deno add @edjopato/telegram-format
import { html as format } from "telegram-format";
import { markdownv2 as format } from "telegram-format";
format.bold("hey");
//=> "*hey*"
format.italic("you");
//=> "_you_"
format.bold(format.italic("they"));
//=> "*_they_*"
format.url("me", "https://edjopato.de");
//=> "[me](https://edjopato.de)"
// Legacy but still works
import { markdown as format } from "telegram-format";
When using format as an alias its easy to switch between Markdown and HTML
fast.
When you have something that might be unescaped you need to use format.escape
before formatting it.
const username = "master_yoda";
format.italic(format.escape(username));
format.monospace and format.monospaceBlock will escape on their own as they
only need to escape specific characters. You do not need to escape the input in
these cases.
MarkdownV2 and HTML are fairly similar in escaping inputs but Markdown is
not. Markdown is still supported by this library and by Telegram for legacy
reasons, but it behaves a bit differently. Markdown still escapes inputs and
does not need format.escape before. Also nested formatting is not supported by
telegram itself. Consider switching to MarkdownV2 or HTML for simplicity
reasons.
FAQs
Format Telegram message texts with Markdown or HTML
The npm package @flla/telegram-format receives a total of 4 weekly downloads. As such, @flla/telegram-format popularity was classified as not popular.
We found that @flla/telegram-format demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.

Security News
Node.js has paused its bug bounty program after funding ended, removing payouts for vulnerability reports but keeping its security process unchanged.

Security News
The Axios compromise shows how time-dependent dependency resolution makes exposure harder to detect and contain.