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

http-customs

v0.0.0

Published

Rust-powered static HTTP call analysis for JavaScript and TypeScript

Readme

http-customs

Find potential HTTP calls in JavaScript and TypeScript files without executing them. Supports common APIs including fetch, Node HTTP, Axios, Got, Ky, Undici, and browser networking APIs.

Requires Node.js 22.12+ and a packaged native binary for your platform. npm release pending.

Get started

npm install http-customs
import customs from "http-customs";

const report = customs("./setup.js");
for (const call of report.calls) {
  console.log(call.method, call.url, call.file, call.location.start.line);
}

// Inspect multiple files and their imports.
const project = customs(["./setup.js", "./prepare.ts"], {
  followImports: true,
});

customs is synchronous. It accepts one path or an array of paths, relative to your working directory or absolute. JS, TS, JSX, and TSX are supported; files are validated by content, even with other extensions. TypeScript types are included.

Read the result

The returned object is JSON-serializable:

| Field | Contents | | ------------- | ---------------------------------------------------------------- | | calls | Detected APIs, methods, URLs, destinations, and source locations | | files | Absolute paths of inspected files | | entryPoints | Unique, canonical input paths | | imports | Imports and their resolution status | | warnings | Known gaps such as dynamic URLs or skipped imports |

Unknown methods and URLs are null. destination contains the URL's protocol, hostname, port, and origin, or is null when unknown or relative. Lines and columns start at 1.

Options

Pass options as the second argument:

| Option | Default | Purpose | | ---------------- | ---------- | ------------------------------------------ | | followImports | false | Inspect statically resolvable dependencies | | maxFiles | 1000 | Limit entry points and inspected files | | maxFileBytes | 2097152 | Limit bytes per file (2 MiB) | | maxTotalBytes | 33554432 | Limit total source bytes (32 MiB) | | maxImportDepth | 100 | Limit dependency traversal depth | | maxAstNodes | 250000 | Limit syntax nodes per file |

Missing or dynamic imports produce warnings. Invalid source or exceeded limits throw instead of returning a partial report. Limits must be positive safe integers.

Handle errors

import customs, { CustomsError } from "http-customs";

try {
  const report = customs("./setup.js");
  console.log(report.calls, report.warnings);
} catch (error) {
  if (!(error instanceof CustomsError)) throw error;
  console.error(error.code, error.file, error.message);
}

Error codes: INVALID_INPUT, READ_ERROR, INVALID_SOURCE, LIMIT_EXCEEDED.

No detected calls does not mean safe. Review warnings and the analysis limitations. For a terminal interface, install http-customs-cli.