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 🙏

© 2025 – Pkg Stats / Ryan Hefner

xmppjs

v1.0.0

Published

Server-side CommonJS module for XMPP connections.

Readme

xmpp.js

Server-side XMPP in Javascript

xmpp.js is a library for Node.js that allows you to connect to an XMPP server as a component.

For those already familiar with the client-side Strophe.js library then there is almost nothing to learn - the API is almost exactly the same. The only difference is that this time you can run your code on the server, and handle XMPP traffic from clients on behalf of a whole domain. It's like writing an XMPP server but with the hard parts handled for you.

xmpp.js works with any XEP-0114-compliant server (that's practically all of them), so you need not worry about your code being tied in to a particular server implementation.

How it works at the XMPP level

XMPP components "bind" to a domain, usually a subdomain of the main XMPP service, such as pubsub.example.org, or conference.example.org. All incoming stanzas addressed to that domain (to='service.example.org') or to entities on that domain (to='[email protected]') will be routed to your xmpp.js-based code.

For outgoing stanzas your component is in full control. You can specify any 'from' address on your stanzas, many servers don't even enforce that the originating domain of the stanza is the component's domain, allowing you to send stanzas on behalf of any user on the server.

Getting started

Firstly, you'll need Node installed if you haven't it already, this is fairly straightforward - instructions are here. xmpp.js is confirmed to work with version 0.1.30 (2010.02.22).

Check out the source xmpp.js code, from either the Mercurial repository or Github project.

In the examples directory you will find an example component which echoes messages it receives back to the sender. If you have a local Prosody server installed then you can simply add these lines to your Prosody config to make this example work:

        Component "echo.localhost"
                component_secret = "hellohello"

Ater restarting Prosody try running:

        node examples/echo.js

Log into your Prosody with a client and send a message to [email protected] - you should receive an instant response back - congratulations!