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

slowerudp

v1.0.8

Published

A package for simple UDP server routing.

Readme

SlowerUDP

SlowerUDP is a small udp framework, it simplifies a little the data handling on udp servers. It is the UDP equivalent of the Slower package.

Usage:

const SlowerUDP = require('slowerudp');
const app = SlowerUDP();

API Methods:

app.onError(callback: (socket, errorMessage)): dgram.Socket

> Sets a callback that will be called on 'error' event.
> The own UDP socket is passed as argument in the callback.
> Returns the own object instance, so that methods can be chained.
app.onClose(callback: (socket)): dgram.Socket

> Sets a callback for the socket event 'close'.
> The own UDP socket is passed as argument in the callback.
> Returns the own object instance, so that methods can be chained.
app.onConnect(callback: (socket)): dgram.Socket

> Sets a callback that will be called on 'connection' event.
> The own UDP socket is passed as argument in the callback.
> Returns the own object instance, so that methods can be chained.
app.fallback(callback: (socket, message, rInfo)): dgram.Socket

> Sets a callback that will be called on 'message' events that were 
  not handled by any declared routes.
> The own UDP socket, and the received message, are passed as 
  arguments in the callback.
> Returns the own object instance, so that methods can be chained.
app.middleware(callback: (socket, message, rInfo)): dgram.Socket

> Sets a callback that will be executed before every 'message' event.
> The own UDP socket, and the received message, are passed as arguments
  in the callback.
> Returns the own object instance, so that methods can be chained.
app.route(callback: (socket, message)): dgram.Socket

> Sets a callback that will be called on 'message' events that 
  matches the specified route.
> The route string supports wildcard characters: '{?}' for 
  replacing one character, or '{*}' for replacing any number 
  of characters.
> The own UDP socket, and the received message, are passed as 
  arguments in the callback.
> Returns the own object instance, so that methods can be chained.
app.start(port=8080, host='127.0.0.1'): Promise<dgram.Socket>

> Defines the port and host to start the server.
> Returns the own object instance, so that methods can be chained.

API Properties

app.routes
> An Array containing Route instances, representing all the 
  declared routes.
> Route objects have this structure:
Route {
    route: String
    callback: Function
}
app.routes: Array[Route...]
app.server: net.Server
app.port: Number
app.host: String
app.fallback: Function
app.middlewares: Array[Function]
app.errorListener: Function
app.closeListener: Function
app.connectListener: Function

Example usage:

// Declare and initialize the module
const SlowerUDP = require('slowerudp');
const app = SlowerUDP();

// Declare 'error' handler:
app.onError((socket, errorMessage) => {
    console.log('there was an error: '+errorMessage);
    socket.close();
});

// Declare 'close' handler:
app.onClose((socket) => {
    console.log('socket closed');
});

// Declare 'connect' handler:
app.onConnect((socket) => {
    console.log('socket connected');
});

// Declare middleware for messages:
app.middleware((socket, msg, rinfo) => {
    console.log(`this will be executed before any route handler`);
});

// Declare route for messages:
app.route('USER {*}', (socket, msg, rinfo) => {
    console.log(`this will respond to data blocks starting with 'USER '`);
});

// Declare fallback for messages:
app.fallback((socket, msg, rinfo) => {
    console.log(`this data: ${msg}, was not handled by any route.`);
});

// Start server
await app.start(8081, '0.0.0.0');
console.log('server is listening');