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

rock-req

v5.2.1

Published

Ultra-light (150 LOC, No dependencies) & Ultra-fast request library with reliable retry on failure, http/https, redirects, gzip/deflate/brotli, extensible, proxy, streams, JSON mode, forms, timeout

Downloads

13,283

Readme

npm ci javascript style guide

🔥 Why?

In most existing libraries (2025):

  • Managing reliable retries is difficult, tricky with streams and not battle-tested
  • Using multiple forward proxies has several benefits like higher availability and increased bandwidth but Intercepting retries to use another Egress controller between two requests is not possible.
  • Many request libraries are heavy: node-fetch, superagent, needle, got, axios, request
  • Lightweight alternatives are not as light as they claim due to dependencies (simple-get, tiny-req, puny-req, phin, ...)

⚡️ Rock-req solves these problems with only 150 lines of code and zero dependencies

It also supports many features:

  • Follows redirects
  • Handles gzip/deflate/brotli responses
  • Modify defaults
  • Extend and create new instances
  • Automatically destroy input/output stream on error and premature close event
  • Advanced retries
  • URL Rewrite
  • Ultra-fast (> 20k req/s)
  • Keep Alive by default (3000ms)
  • Composable
  • Timeouts
  • Promises interface
  • HTTPS / HTTP
  • Composes well with npm packages for features like cookies, proxies, form data, & OAuth
  • Keep 98% of the simple-get API (fork source)

When the callback is called, the request is 100% finished, even with streams.

🚀 Benchmark Rock-req vs got, axios, node-fetch, phin, simple-get, superagent, ...

Stop using "slow-by-default" and "false-light" HTTP request libraries!

2025-11-14 on MacBook Pro M4 Max with all dependencies updated on this date

| Library | NodeJS 22 | NodeJS 24 | NodeJS 25 | Bun v1.3.2 | LOC (2025/2023) | |--------------|-----------:|------------:|---------:|-----------:|----------------:| | rock-req 🙋‍♂️ | 26842 ops | 26782 ops | 26179 ops | 21229 ops | 152 (+5%) | | simple-get | 26532 ops | 26802 ops | 25954 ops | 21187 ops | 317 (+0%) | | axios | 4110 ops | 3999 ops | 3996 ops | 14788 ops | 19883 (+42%) | | got | 14786 ops | 15234 ops | 15149 ops | 15287 ops | 16904 (+83%) | | fetch | 15676 ops | 16252 ops | 15784 ops | 27675 ops | 54211 (+306%) | | request | 17102 ops | 14586 ops | 14346 ops | 18202 ops | 58057 (+24%) | | superagent | 3862 ops | 3979 ops | 3889 ops | 19271 ops | 31913 (+98%) | | phin | 15549 ops | 14160 ops | 13915 ops | 15430 ops | 20064 (+5960%) | | undici* | 32480 ops | 33272 ops | 32738 ops | 25961 ops | 23235 (+43%) |

2023-04-19 on Macbook Pro M1 Max with all dependencies updated on this date

| Library | NodeJS 16 | NodeJS 18 | NodeJS 20* | Size deps inc. | | ------------ |--------------:|--------------:| --------------:| --------------:| | rock-req 🙋‍♂️ | 22816 ops | 21797 ops | 21964 ops | 144 LOC | | simple-get | 2937 ops | 3260 ops | 21258 ops | 317 LOC | | axios | 5090 ops | 4910 ops | 3196 ops | 13983 LOC | | got | 2163 ops | 1762 ops | 9961 ops | 9227 LOC | | fetch | 2101 ops | 2102 ops | 2020 ops | 13334 LOC | | request | 2249 ops | 1869 ops | 15815 ops | 46572 LOC | | superagent | 2776 ops | 2100 ops | 2895 ops | 16109 LOC | | phin | 3178 ops | 1164 ops | 21299 ops | 331 LOC | | undici* | 24095 ops | 24378 ops | 24191 ops | 16225 LOC |

LOC = Lines of Code, including dependencies (excluding dev dependencies) ops = request per second

Since Node.js 20, HTTP keep-alive is activated by default, just like in rock-req. This improves the overall performance of all frameworks.

undici is a low-level API and a faster alternative to the native Node.js HTTP module. It represents the performance ceiling for Node.js.

rock-req uses only the native Node.js HTTP module and provides many high-level features — far more than phin and simple-get — with fewer lines of code.

Interestingly, the differences are less visible on Bun.sh.

Install

  npm install rock-req

Documentation

The full documentation is here to reduce Node package file size.

Supporters

This packaged in maintained by Carbone:

Thank you Feross Aboukhadijeh, creator of simple-get