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

runtime-lint

v0.4.0

Published

A runtime "linter" for your js application.

Downloads

80

Readme

runtime-lint

A runtime "linter" for your js application.

runtime-lint is a simple way to look for bad patterns in your applications at runtime. It is mostly tailored towards browser apps, but should work outside the browser as well. It can detect

  • overfetching: See what parts of your json response actually ends up on the web page, and what is never used.
  • queries in loops: Detects e.g. fetching for each row in a table.
    • This is a best effort attempt, as, for instance, detecting whether two endpoints point to the same kind of resource, but with different ids can be difficult (i.e. /users/1, /users/2 are clearly asking for the same kind of resource, but for other cases it can be almost impossible to find).
  • cache opportunities: for instance when lots of the same calls are being made continuously with the exact same response, it might indicate a refetch policy that is too aggressive, or that a cache (or better use of one) could reduce the amount of calls.
  • More to come...

Getting started

It is very simply to add to any project, just add this to the <head> of your html file

<script
  crossOrigin="anonymous"
  src="//unpkg.com/runtime-lint/dist/auto.global.js"
/>

You can also install it with your favorite package manager

npm install runtime-lint

and then import it somewhere in your project

import "runtime-lint/auto";
// Or, if you'd like to do it manually
import {
  // Call this to initialize the widget
  initWidget,
  // Low-level setup
  runtimeLint
} from "runtime-lint";

Configuration is currently not supported, but the below describes the "linting" rules used.

overFetching

The overFetching rules tries to detect when json responses from a fetch call has been under-utilized. This could suggest over fetching. At the moment, the rule reports underuse if less than half the top-level keys of a response has been used.

This is currently only supported for fetch-implementations. i.e. not XMLHttpRequest, and hence axios.

queryInLoop

The queryInLoop rule tries to detect when similar urls are called in a loop, e.g. /user/1, /user/2, /user/3 and so on. This might suggest that a fetch-call is made in a loop, e.g. for each row in a table or similar. This is a best-effort approach, since detecting when two url's are "similar" enough can be difficult.

duplicateResponses

The duplicateResponses rules tries to detect when the same url has been called two times or more with the exact same response. This might suggest a bad caching solution or a refetch policy that is too aggressive.

Acknowledgements

  • react-scan - The widget and much of the code setup is heavily inspired by react-scan.