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

irc-client-ts

v0.23.1

Published

IRC client protocol module for Deno, Node.js and Bun

Readme

irc

ci JSR npm Deno 2+ Node.js 20+ Bun 1+

IRC client protocol module for Deno 2+, Node.js 20+ and Bun 1+ which aims to provide an easy way to talk with IRC servers.

  • Cross-runtime — runs on Deno, Node.js and Bun with the same API
  • Fully typed — events, commands and state are inferred from TypeScript, no guessing
  • Plugin architecture — 50+ built-in plugins (SASL, DCC, CTCP, reconnect, flood control...)
  • IRCv3 — server-time, echo-message, message-tags, MONITOR, SASL, and more
  • Zero dependencies — no external runtime dependencies

Any feedback and contributions are welcome.

Available on JSR and npm.

Originally built for Deno as deno-irc, now also compatible with Node.js and Bun.

Documentation

Getting Started

Installation

Deno:

import { Client } from "jsr:@irc/client";

Node.js:

npm add irc-client-ts
import { Client } from "irc-client-ts";

Bun:

bun add irc-client-ts
import { Client } from "irc-client-ts";

Usage

Instantiate a new client like this:

const client = new Client({
  nick: "my_nick",
  channels: ["#my_channel"],
});

One instance manages one connection. If you want to connect to many servers, use many instances.

See API Reference to learn more about available options.

Then you can listen to events and send commands:

client.on("join", (msg) => {
  if (msg.params.channel === "#my_channel") {
    client.privmsg("#my_channel", "Hello world!");
  }
});

Finally you have to establish a connection with the server:

await client.connect("irc.libera.chat");

await client.connect("irc.libera.chat", { port: 6697, tls: true });

When using Deno, connecting to servers requires the --allow-net permission:

deno run --allow-net ./code.ts

Events

Events are simple messages which are emitted from the client instance.

They can be received by listening to their event names:

client.on("join", (msg) => {
  const { source, params } = msg;
  console.log(`${source?.name} has joined ${params.channel}`);
});

Thanks to TypeScript, type of msg is always inferred from the event name so you do not have to worry about what is in the object or about the IRC protocol.

client.on("nick", ({ source, params }) => {
  console.log(`${source?.name} is now known as ${params.nick}`);
});

client.on("privmsg", ({ source, params }) => {
  console.log(`${source?.name} on ${params.target} says ${params.text}`);
});

Some events, like "privmsg" and "notice", can be filtered like this:

client.on("privmsg:channel", ({ source, params }) => {
  console.log(`${source?.name} on ${params.target} says ${params.text}`);
});

client.on("notice:private", ({ source, params }) => {
  console.log(`${source?.name} notices to you: ${params.text}`);
});

Subscribing to more than one event is also possible by passing an array of event names:

client.on(["part", "kick"], (msg) => {
  // msg is PartEvent | KickEvent
});

See API Reference to learn more about events.

Commands

Commands are the way to send messages to the server.

They can be sent by just calling them:

client.join("#channel");

client.privmsg("#channel", "Hello world!");

client.quit("Goodbye!");

See API Reference to learn more about commands.

Errors

When an error is emitted, it will be thrown by default and causes a crash of the program.

To avoid the client from crashing, it is required to have at least one event listener for the "error" event name.

See API Reference to learn more about errors.

Contributors

See CONTRIBUTING.md to get started.

License

MIT