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

rc-chat

v0.1.1

Published

A DHT chat for my time at recurse center

Readme

rc-kademlia 🕸️

Build Status Try rc-kademlia on RunKit install size

This is a DHT for use on a local network. It takes bootstrap peer information or will broadcast on port 1338 asking for local peers. The local peer discovery uses udp Datagrams which can be relied upon to arrive as a whole message. A small binary packet is used to communicate info

Install

npm install rc-kademlia

Development

To build and run 10 nodes type

docker-compose up --build --scale node=10

Example

Overview

API

tk

function tk<T>(size: number, iterable: AsyncIterable<T>): AsyncIterableIterator<T[]>
function tk<T>(size: number, iterable: Iterable<T>): IterableIterator<T[]>

TK means "to come" in editing parlance. This isn't a real function - the api is TK

size can be betweeen 1 and Infinity.

import { batch } from 'rc-kademlia'
import { getPokemon } from 'iterable-pokedex'

// batch 10 pokemon while we process them
for await (const pokemons of batch(10, getPokemon())) {
  console.log(pokemons) // 10 pokemon at a time!
}

Contributors wanted!

Writing docs and code is a lot of work! Thank you in advance for helping out.

TODO

Tomorrow I want to get

  • [x] limit local peer discovery to one node
  • [x] find_node request and response flow
  • [x] the recursive find_node search
  • [x] actual good find_node results
  • [x] dht bootstrapping process (does this need a real address book with actual k-buckets? Maybe)
  • A better way of visualizing what's going on

Thing I probably won't do

  • [ ] peer state and removal
    • responses should count as a pong
  • [ ] store and find_value
  • [ ] a real k-bucket address book

Things I'll probably have to do but don't want to

  • test with many more peers
  • visualize what's going on with many more peers

References

  • https://pdos.csail.mit.edu/~petar/papers/maymounkov-kademlia-lncs.pdf
  • https://www.roborooter.com/post/kademlia-study
  • https://stackoverflow.com/questions/19329682/adding-new-nodes-to-kademlia-building-kademlia-routing-tables