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

wire.io

v3.3.3

Published

Socket.io wrapper to enable client to client communications like RPC and pub/sub. Inspired by WAMP protocol.

Readme

Wire.io

A web client to client communication channel that mimic WAMP protocol. You can pub/sub event and make RPC calls directly to other clients through a router. Way mush simpler and light than Autobahn and don't need a fat router when you need something less powerfull. It based on venerable and very useful socket.io.

Compatible with 2.X and 3.X version of socket.io.

Usage

Wire.io rely on socket.io for server and client.

Launch the server without installing with npx:

npx wire.io # need npm v7 in order to work

Launch using docker:

docker run --rm  -p 4000:4000 jrmi/wire.io

Installation

npm install wire.io

Serve side code

If you want to integrate Wire.io to your existing server, follow this instructions:

import express from 'express';
import { handleWire } from 'wire.io';

var app = express();
var http = require('http').createServer(app);
var io = require('socket.io')(http);

const port = process.env.PORT || 4000;

http.listen(port, () => {
  console.log(`listening on *:${port}`);
});

io.on('connection', (socket) => {
  const options = { // This are defaults
    log: console.log;
    logPrefix = '[Wire] '
  }
  handleWire(socket, options); // Option is optionnal
});

Client side code

import io from 'socket.io-client';
import { joinWire } from 'wire.io';

const socket = io.connect("<socket server url>", {
      'reconnection delay': 0,
      'reopen delay': 0,
      forceNew: true,
    });

// Create room object
const room = await joinWire({
  socket: socket, // Socket io socket object
  room: 'test', // Room name
  onJoined = (room) => { // Callback when room is joined (Optionnal)
    console.log("Connected to wire.io server with id ", room.userId);
  },
  onMaster = (room) => { // Callback if the user is the room master i.e. the first user (on next if first quit). (Optionnal)
    console.log("You are now master of the room");
  },
  userId: "myuserid" // To force user id (Optionnal)
});

API

All calls are client side. Since you have the room instance you can comunicate with other client with this API.

.publish("eventName", params, self=false)

Send an event to all other clients in room. Also to self if true. params can be any js type that is serializable.

.subsribe("eventName", callback) -> unsubscribe callback

Subscribe the callback to an event. The callback receive the params data if any.

.register("functionName", callback) -> unregister callback

Register a function to be called by other clients. If any client use .call with the same function name, the callback will be called with the given parameters.

.call("functionName", params) -> call result

Call a previously registered function. Return the call result.

Dev installation

First install dependencies:

npm ci

Start the server in watch mode:

npm run dev

Then run tests:

npm test