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

@azizemad/neonize-node

v0.2.1

Published

Simple WhatsApp API for Node.js - powered by Neonize

Downloads

182

Readme

neonize-node

Simple, powerful WhatsApp API for Node.js — powered by Neonize.

npm version License: MIT

Features

  • 🚀 Simple API - Send messages in just a few lines of code
  • 📱 Full WhatsApp Support - Messages, media, groups, reactions, polls & more
  • 🔒 Multi-Device - Works with WhatsApp's multi-device protocol
  • High Performance - Native Go library via FFI
  • 📦 Zero Config - Just install and connect

Installation

npm install @azizemad/neonize-node

The native library is automatically downloaded on install.

Supported Platforms

| Platform | Architecture | Status | |----------|--------------|--------| | Windows | x64 | ✅ | | Linux | x64 | ✅ | | Linux | ARM64 | ✅ | | macOS | x64 | ✅ | | macOS | ARM64 (M1+) | ✅ |

Quick Start

Simple API (Recommended)

import { WhatsApp } from '@azizemad/neonize-node';

const wa = new WhatsApp();

wa.onMessage((msg) => {
    console.log(`${msg.sender}: ${msg.text}`);
    
    if (msg.text === 'ping') {
        msg.reply('pong 🏓');
    }
});

wa.onConnected(() => {
    console.log('Connected! My number:', wa.myNumber);
});

wa.connect();

Send Messages

// Text message
wa.send('1234567890', 'Hello from neonize-node!');

// Image with caption
wa.sendImage('1234567890', './photo.jpg', 'Check this out!');

// Document
wa.sendDocument('1234567890', './file.pdf', 'document.pdf');

// Poll
wa.sendPoll('1234567890', 'Best pizza topping?', ['Pepperoni', 'Mushrooms', 'Pineapple']);

Message Actions

wa.onMessage((msg) => {
    // Reply with quoted context
    msg.reply('Thanks for your message!');
    
    // React to the message
    msg.react('👍');
    
    // Delete the message (your own messages only)
    msg.delete();
    
    // Download media
    if (msg.hasImage) {
        const buffer = msg.downloadMedia();
        fs.writeFileSync('image.jpg', buffer);
    }
});

Groups

// Get all groups
const groups = wa.getGroups();

// Get group info
const info = wa.getGroupInfo('[email protected]');

Advanced API

For full control, use the NewClient class directly:

import { NewClient, Event, EventType } from '@azizemad/neonize-node';

const client = new NewClient('session.db');

// Set up event handling
client.event.onMessage((client, message) => {
    console.log('Received:', message);
});

client.event.onConnected((client) => {
    console.log('Connected!');
    
    // Full API access
    client.sendMessage(jid, { conversation: 'Hello!' });
    client.sendReaction(chatJid, senderJid, messageId, '❤️');
    client.editMessage(chatJid, messageId, 'Edited text');
    // ... and 90+ more methods
});

await client.connect();

API Reference

WhatsApp Class (Simple API)

| Method | Description | |--------|-------------| | onMessage(handler) | Handle incoming messages | | onConnected(handler) | Handle connection | | onQR(handler) | Handle QR code display | | onDisconnected(handler) | Handle disconnection | | send(to, text) | Send text message | | sendImage(to, image, caption?) | Send image | | sendVideo(to, video, caption?) | Send video | | sendDocument(to, doc, filename) | Send document | | sendPoll(to, question, options) | Send poll | | getGroups() | Get joined groups | | getGroupInfo(groupId) | Get group details | | connect() | Start connection | | disconnect() | Close connection | | logout() | Logout and clear session |

Message Class

| Property | Description | |----------|-------------| | text | Message text content | | sender | Sender's phone number | | chatId | Chat identifier | | id | Message ID | | isGroup | Is from a group? | | isFromMe | Is from yourself? | | hasImage | Has image attachment? | | hasVideo | Has video attachment? | | hasDocument | Has document attachment? |

| Method | Description | |--------|-------------| | reply(text) | Reply with quoted context | | react(emoji) | React with emoji | | delete() | Delete/revoke message | | downloadMedia() | Download media as Buffer |

Configuration

Database Location

The session is stored in a SQLite database. Default is neonize.db in the current directory.

const wa = new WhatsApp('my-session.db');

Logging

Enable debug logging:

const client = new NewClient('session.db', {
    logLevel: 'DEBUG' // DEBUG, INFO, WARN, ERROR
});

client.event.debug(true);

Requirements

  • Node.js 18.0.0 or higher
  • Windows, Linux, or macOS (x64 or ARM64)

Troubleshooting

"Could not find goneonize library"

The native library wasn't downloaded. Run manually:

node node_modules/@azizemad/neonize-node/scripts/download.js

"Couldn't link device" on QR scan

This usually means the session is corrupted. Delete the .db file and try again.

Credits

  • Neonize - The Go library powering this package
  • whatsmeow - WhatsApp Web API implementation

License

MIT © See LICENSE for details.