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

nsrace

v1.0.1

Published

Runs a race, lookups the fastest IP of any domain from different DNS servers

Readme

nsrace

:runner: Runs a race, lookups the fastest IP of any domain from different DNS servers

Installation

npm i -g nsrace

Usage

Basic

nsrace run github.com
# √ NSLookup 12/12
# √ Ping 1/1
# ┌────────────────┬─────────────────────┬─────────────────┐
# │ IP             │ Ping (ms)           │ Providers       │
# ├────────────────┼─────────────────────┼─────────────────┤
# │ 13.229.188.59  │ 252.43719290000004  │ 117.50.11.11... │
# └────────────────┴─────────────────────┴─────────────────┘
nsrace run https://github.githubassets.com/favicons/favicon.svg
# √ NSLookup 12/12
# √ Fetch 1/1
# ┌─────────────────┬─────────────────────┬─────────────────┐
# │ IP              │ Duration (ms)           │ Providers       │
# ├─────────────────┼─────────────────────┼─────────────────┤
# │ 185.199.110.154 │ 189.43719290000004  │ 117.50.11.11... │
# └─────────────────┴─────────────────────┴─────────────────┘

Output as JSON

nsrace run github.com -o json
# [{"ip":"20.205.243.166","duration":62.237456499999986,"providers":[{"protocol":"DNS","server":"117.50.11.11"},{"protocol":"DNS","server":"223.5.5.5"},{"protocol":"DNS","server":"119.29.29.29"},{"protocol":"DNS","server":"180.76.76.76"},{"protocol":"DNS","server":"101.226.4.6"},{"protocol":"DNS","server":"123.125.81.6"},{"protocol":"DNS","server":"101.226.4.6"},{"protocol":"DNS","server":"101.226.4.6"},{"protocol":"DNS","server":"101.6.6.6"},{"protocol":"DNS","server":"1.2.4.8"},{"protocol":"DNS","server":"8.8.8.8"},{"protocol":"DNS","server":"1.1.1.1"},{"protocol":"DNS","server":"4.2.2.1"},{"protocol":"DNS","server":"9.9.9.9"},{"protocol":"DNS","server":"208.67.222.222"},{"protocol":"DoH","server":"1.1.1.1"},{"protocol":"DoH","server":"8.8.8.8"},{"protocol":"DoH","server":"9.9.9.9"},{"protocol":"DoH","server":"208.67.222.222"}]}]

Play with json

# first, install the ``json`` package to the global
npm i -g json

nsrace run github.com --silent -o json | json 0.ip
# 20.205.243.166

Run nsrace or nsrace --help for more information.

Commands

run [domain|url]

Run a race and return IPs sorted by speed

Options

  • -o, --output [format]

    Specify the format of the output [table|tsv|json]

    Default: table

  • --ping-timeout [ms]

    Ping timeout (speed test)

    Default: 1000

  • --fetch-timeout [ms]

    Fetch timeout (speed test)

    Default: 1000

  • -s, --silent

    Hide the progress

  • -v, --verbose

    Display verbose information

list

List all DNS servers that will be used in the race

Options

  • -o, --output [format]

    Specify the format of the output [table|tsv|json]

    Default: table

add [dns]

Add DNS servers

Options

  • -t, --type [protocol]

    Specify the type of protocol [dns|doh]

    Default: dns

remove [dns]

Remove DNS servers

Options

  • -t, --type [protocol]

    Specify the type of protocol [dns|doh]

    Default: dns

Related

Reference

License

MIT @ yelo