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

@buildkitgg/typescript-utils

v0.1.0

Published

A curated set of TypeScript utilities: es-toolkit, ts-extras, ts-pattern, type-fest, tiny-invariant and ts-reset behind one import.

Readme

@buildkitgg/typescript-utils

One dependency for everyday TypeScript utilities. It re-exports es-toolkit, ts-extras, ts-pattern, type-fest and tiny-invariant from a single root import, and applies ts-reset to your app.

pnpm add @buildkitgg/typescript-utils

Then turn on ts-reset in tsconfig.json, as described in ts-reset:

{
  "compilerOptions": {
    "types": ["@buildkitgg/typescript-utils/reset"]
  }
}
import { chunk, invariant, isPresent, match, P, type SetRequired } from "@buildkitgg/typescript-utils"

type Shape = { kind: "circle"; radius: number } | { kind: "square"; size: number }

function area(shape: Shape) {
  return match(shape)
    .with({ kind: "circle" }, ({ radius }) => Math.PI * radius ** 2)
    .with({ kind: "square", size: P.number }, ({ size }) => size ** 2)
    .exhaustive()
}

function pairs(values: (number | undefined)[], config: SetRequired<{ name?: string }, "name">) {
  invariant(config.name, "config needs a name")
  return chunk(values.filter(isPresent), 2)
}

Every export keeps its upstream signature and documentation, and its upstream name. The one exception is tiny-invariant's default export, which is exported as invariant. Bundlers drop what you don't import, since every package involved is free of side effects.

What's included

Everything each upstream package exports, except the exports this package deliberately leaves out where two packages overlap. The agent guide lists every export, each exclusion with its reason, and what to use instead. The API reference links each export to its upstream source and documentation.

ts-reset

ts-reset's recommended rules tighten built-in types across the whole program. JSON.parse and response.json() return unknown instead of any, .filter(Boolean) removes falsy types, and Array.isArray narrows to unknown[].

Turn them on by adding the reset entry point to compilerOptions.types in each tsconfig.json that type-checks your app's code:

{
  "compilerOptions": {
    "types": ["@buildkitgg/typescript-utils/reset"]
  }
}

Setting types stops TypeScript from loading every @types package automatically, so list the ones your project relies on alongside it:

{
  "compilerOptions": {
    "types": ["@buildkitgg/typescript-utils/reset", "node", "vite/client"]
  }
}

The rules also apply once any file in the program imports from @buildkitgg/typescript-utils, but the tsconfig entry makes them apply from the start, whatever the code imports.

To confirm the rules apply, check that JSON.parse returns unknown:

// @ts-expect-error ts-reset types JSON.parse as unknown
const check: number = JSON.parse("1")

TypeScript reports an unused @ts-expect-error directive when the rules are off.

These are global type changes, so depend on this package from apps rather than from published libraries. A library that imports it applies ts-reset to every app that installs the library.

Maintaining the curation

curation.ts lists the upstream packages and every exclusion. Each exclusion names the export, why it is left out, and what to use instead. pnpm --filter @buildkitgg/typescript-utils generate rebuilds src/index.ts, reexports.json and AGENTS.md from it, and check:types fails when they are out of date. After an upstream update, regenerate and review the change to api-reports/typescript-utils.api.md.