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

dude-wa-sticker

v0.0.1

Published

Pembuat dan pemformat stiker untuk WhatsApp

Readme

DUDE STICKER - WhatsApp Sticker Generator Library

Banner

npm version Downloads

A lightweight, high-performance JavaScript library for creating WhatsApp stickers with rich metadata support. Convert images, GIFs, and videos to WhatsApp-compatible WebP stickers with ease.

Key Features ✨

  • 🚀 Pure JavaScript implementation (No TypeScript build required)
  • 🔥 Supports all WhatsApp sticker metadata (pack, author, categories)
  • 📁 Multiple input formats: Buffer, URL, SVG, file path
  • 🎨 Advanced styling options (crop, full, circle, rounded, star)
  • 🌈 Custom background colors (hex or RGBA)
  • ⚡ Optimized performance for server environments
  • 🔄 GIF/Video to animated WebP conversion
  • 📦 Built-in methods for Baileys-MD compatibility

Installation 💻

npm install dude-wa-sticker
# or
yarn add dude-wa-sticker

Quick Start 🚀

Basic Usage

import { Sticker, StickerTypes } from 'dude-wa-sticker';

// Create sticker from image URL
const sticker = new Sticker('https://example.com/image.jpg', {
  pack: 'Awesome Pack', 
  author: 'Sticker Creator',
  type: StickerTypes.FULL,
  categories: ['😂', '❤️'],
  quality: 90,
  background: '#ffffff'
});

// Save to file
await sticker.toFile('sticker.webp');

// Get as Buffer
const buffer = await sticker.toBuffer();

// Send via Baileys
conn.sendMessage(jid, await sticker.toMessage());

Advanced Usage

// Method chaining example
const sticker = await new Sticker('local/image.png')
  .setPack('Travel Pack')
  .setAuthor('Wanderlust')
  .setCategories(['✈️', '🌍'])
  .setBackground('#00a8ff')
  .setQuality(80)
  .toBuffer();

// SVG Sticker
const svgSticker = new Sticker(`
  <svg width="512" height="512" viewBox="0 0 512 512">
    <circle cx="256" cy="256" r="200" fill="#ff5722"/>
  </svg>
`, {
  author: 'SVG Artist'
});

API Reference 📚

Sticker Class

Constructor

new Sticker(source: Buffer | string, options?: StickerOptions)

Methods

| Method | Description | Returns | |--------|-------------|---------| | .toBuffer() | Converts sticker to Buffer | Promise<Buffer> | | .toFile(path: string) | Saves sticker to file | Promise<void> | | .toMessage() | Formats for Baileys-MD | Promise<Message> | | .setPack(pack: string) | Sets sticker pack name | this | | .setAuthor(author: string) | Sets author name | this | | .setType(type: StickerTypes) | Sets sticker type | this | | .setCategories(categories: string[]) | Sets sticker categories (emojis) | this | | .setQuality(quality: number) | Sets output quality (0-100) | this | | .setBackground(background: Color) | Sets background color | this |

StickerOptions

| Option | Type | Default | Description | |--------|------|---------|-------------| | pack | string | undefined | Sticker pack name | | author | string | undefined | Author name | | type | StickerTypes | DEFAULT | Sticker style type | | categories | string[] | [] | Sticker categories (emojis) | | quality | number | 100 | Output quality (0-100) | | background | Color | transparent | Background color |

StickerTypes Enum

enum StickerTypes {
  DEFAULT = 'default',
  CROPPED = 'crop',
  FULL = 'full',
  CIRCLE = 'circle',
  ROUNDED = 'rounded',
  STAR = 'star'
}

Examples 🎨

Creating Different Sticker Types

// Cropped sticker
const cropped = new Sticker(image, { 
  type: StickerTypes.CROPPED 
});

// Circle sticker
const circle = new Sticker(image, {
  type: StickerTypes.CIRCLE,
  background: '#ffffff'
});

// Animated sticker from GIF
const animated = new Sticker('animation.gif', {
  pack: 'Animations',
  quality: 80
});

Extracting Metadata

import { extractMetadata } from 'dude-wa-sticker';

const metadata = await extractMetadata(stickerBuffer);
/*
{
  emojis: ['😂'],
  'sticker-pack-id': '12345',
  'sticker-pack-name': 'Funny Pack',
  'sticker-author-name': 'MyPice'
}
*/

Best Practices ✅

  1. Quality Settings: For optimal results:

    • Static images: 90-100 quality
    • Animated stickers: 70-80 quality (better filesize)
  2. Background Colors:

    • Use transparent (undefined) for cut-out stickers
    • Use solid colors for full-size stickers
  3. Performance Tips:

    • Reuse Sticker instances when possible
    • For batch processing, consider using worker threads

Contributing 🤝

We welcome contributions! Please read our Contribution Guidelines before submitting pull requests.

License 📄

This project is licensed under the GPL-3.0.


Made with ❤️ by [HELVIO & REYHAN] | GitHub | npm