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

@dbx-tools/path

v0.3.20

Published

Node filesystem path toolkit for discovery, matching, ignoring, scanning, and watching.

Readme

@dbx-tools/path

Node filesystem path toolkit for discovery, matching, ignoring, scanning, and watching.

Import this package when Node code needs consistent glob behavior across CLI, projen, barrel generation, OpenAPI generation, or docs tooling.

Key features:

  • Lazy glob-backed file discovery that composes with shared-core sequences.
  • Glob-to-predicate matchers for include/exclude logic.
  • Centralized ignore rules for generated files, dependencies, package-manager output, VCS folders, and build artifacts.
  • Workspace scan option types shared by synthesis and docs tooling.
  • Chokidar wrapper for watch loops that should follow the same ignore behavior.
  • Escaped glob pattern builders for generated matcher fragments.

Find Files

import { find, ignore } from "@dbx-tools/path";

const files = find
  .findFiles(["workspaces/**/src/**/*.ts"], {
    ignore: ignore.ignorePatterns(),
  })
  .toArray();

find.findFiles() returns a lazy Sequence<string> from @dbx-tools/shared-core, so callers can map/filter without materializing immediately.

Use this package instead of direct glob or chokidar calls when the result should agree with package discovery, barrel generation, or cleanup logic.

Compile Matchers

import { match } from "@dbx-tools/path";

const isTest = match.toPathMatcher("**/*.test.ts");
if (isTest("workspaces/shared/model/test/classify.test.ts")) {
  skip();
}

match.toPathMatcher() returns a composable shared-core predicate. Use match.pathMatchTests() when you need to inspect the compiled include/exclude tests.

Reuse Ignore Rules

import { ignore } from "@dbx-tools/path";

const matcher = ignore.ignorePathMatcher({
  generated: true,
  dependencies: true,
  vcs: true,
});

The ignore helpers centralize repo-wide exclusions such as node_modules, generated files, build output, VCS metadata, and package-manager output.

Scan Workspace Packages

import { scan } from "@dbx-tools/path";

const options: scan.FileScanOptions = {
  roots: ["workspaces", "example-workspaces"],
  followSymlinks: scan.FOLLOW_SYMLINKS_DEFAULT,
};

scan exports shared scan option types used by the projen engine. Use the same options when implementing docs or analysis tools that should walk the workspace like synthesis does.

Watch Files

import { watch } from "@dbx-tools/path";

const watcher = watch.watchFiles(["workspaces/**/src/**/*.ts"], {
  ignoreInitial: true,
});

watcher.on("change", (file) => rebuild(file));

watch.watchFiles() wraps chokidar with the same path and ignore expectations used by the rest of the repo tooling.

Build Patterns

import { pattern } from "@dbx-tools/path";

const nodeModulesPattern = pattern.directoryNamePattern("node_modules");
const tsPattern = pattern.fileExtensionPattern("ts");

Pattern helpers keep generated glob fragments escaped and consistent.

Modules

  • find - glob-backed lazy file finding.
  • match - glob-to-predicate path matchers.
  • ignore - standard ignore pattern and matcher construction.
  • scan - workspace package scan option types and defaults.
  • watch - chokidar wrapper for file watching.
  • pattern - escaped directory-name and extension glob fragments.

The projen engine uses this package in @dbx-tools/projen.