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

ng-whatsapp-format

v1.0.3

Published

Angular pipe to format WhatsApp-style text (bold, italic, strikethrough, code, etc.)

Downloads

95

Readme

ngWhatsappFormat Angular Pipe

Format WhatsApp-style text in your Angular applications!

This package provides the NgWhatsappFormatPipe, a powerful Angular pipe for parsing and rendering WhatsApp-like formatted text (bold, italic, strike, inline code, quotes, and links) as styled HTML.

Features

  • Bold, Italic, ~Strike-through~, Inline Code
  • WhatsApp-style > blockquotes
  • Recognizes and autolinks URLs and plain domains (google.com)
  • Injects CSS styles dynamically
  • Standalone Angular pipe (Angular 14+ compatible)
  • Secure output: only intended for controlled text inputs (trusted sources)

Installation

npm install ng-whatsapp-format

Usage

1. Import the Pipe

In your Angular module or component:

import { NgWhatsappFormatPipe } from "ng-whatsapp-format-pipe";

If using the pipe stand-alone (Angular 14+), simply register it in your component:

@Component({
  selector: "your-component",
  standalone: true,
  imports: [NgWhatsappFormatPipe],
})
export class YourComponent {}

2. Use the Pipe in Templates

<div [innerHTML]="yourTextValue | ngWhatsappFormat"></div>

Tip: Always bind to innerHTML for styled output! Do not use {{ text | ngWhatsappFormat }}.

Supported Formats

| WhatsApp Syntax | Renders as | Example Input | Output | | --------------- | ------------------ | --------------- | ------------------------------- | | *bold* | Bold | *bold* | bold | | _italic_ | Italic | _italic_ | italic | | ~strike~ | ~~Strike-through~~ | ~strike~ | ~~strike~~ | | \inline` |Inline code |`code` |code | |> quote | Blockquote |> quoted text| > quoted text | |google.com | Clickable link |google.com` | google.com |

Example

TypeScript:

message = "*Bold* _Italic_ ~Strike~ `Code` > Quote google.com";

Template:

<div [innerHTML]="message | ngWhatsappFormat"></div>

Renders as:

Bold Italic ~~Strike~~ Code

Quote

google.com

Notes

  • Styles are injected only once per application run
  • Multi-line bullet and numbered lists, and triple backtick monospace are not enabled in this version, but can be enhanced by uncommenting related code in the source

License

MIT

Contributing

Contributions are welcome! Please create issues or submit pull requests to help improve this package.


Let me know if you'd like this published on GitHub or NPM with proper structure (e.g., module metadata, package.json, etc.).