Introducing Socket Firewall: Free, Proactive Protection for Your Software Supply Chain.Learn More
Socket
Book a DemoInstallSign in
Socket

@discordjs/formatters

Package Overview
Dependencies
Maintainers
2
Versions
1000
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@discordjs/formatters

A set of functions to format strings for Discord.

Source
npmnpm
Version
1.0.0-dev.1751760954-024ae5c56
Version published
Weekly downloads
285K
15.7%
Maintainers
2
Weekly downloads
 
Created
Source

discord.js


Discord server npm version npm downloads Build status Last commit. Code coverage

Vercel Cloudflare Workers

About

@discordjs/formatters is a collection of functions for formatting strings to be used on Discord.

Installation

Node.js 22.12.0 or newer is required.

npm install @discordjs/formatters
yarn add @discordjs/formatters
pnpm add @discordjs/formatters
bun add @discordjs/formatters

Example usage

The example uses ES modules.

import { codeBlock } from '@discordjs/formatters';

const formattedCode = codeBlock('hello world!');
console.log(formattedCode);

// Prints:
// ```
// hello world!
// ```

Contributing

Before creating an issue, please ensure that it hasn't already been reported/suggested, and double-check the documentation.
See the contribution guide if you'd like to submit a PR.

Help

If you don't understand something in the documentation, you are experiencing problems, or you just need a gentle nudge in the right direction, please don't hesitate to join our official discord.js Server.

FAQs

Package last updated on 06 Jul 2025

Did you know?

Socket

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.

Install

Related posts