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

@devmedic/project-scanner

v0.1.0

Published

Fast, parallel, cached detection of project structure and platform (React Native, Expo, TypeScript/JavaScript) — returns a ProjectContext.

Readme

@devmedic/project-scanner

Fast, parallel, cached detection of what a project actually is — React Native, Expo, TypeScript, JavaScript — from its structure. scanProject(root) returns a ProjectContext describing that structure; nothing here executes rules or reads file contents beyond package.json.

import { scanProject } from '@devmedic/project-scanner';

const context = await scanProject(process.cwd());

context.platform.isReactNative; // boolean
context.platform.isExpo; // boolean
context.platform.isReact; // boolean
context.platform.isNode; // boolean
context.platform.isExpress; // boolean
context.platform.isNestJs; // boolean
context.platform.isNextJs; // boolean
context.language.detected; // 'typescript' | 'javascript' | 'mixed' | 'unknown'
context.packageJson?.workspaces; // readonly string[] | null — the "workspaces" field, if any
context.packageJson?.hasBin; // boolean — whether a "bin" field is present
context.packageJson?.main; // string | null — the "main" field, if any

What it reads

| Signal | Read as | | -------------------------------------------------------- | -------------------------------------------------------------------------------------------- | | package.json | Parsed for name, version, dependencies, devDependencies, workspaces, bin, main | | android/, ios/, src/, assets/ | Existence only (no contents) | | metro.config.{js,cjs,mjs,ts} | First match, in that priority order | | babel.config.{js,cjs,mjs,json}, .babelrc[.js\|.json] | First match, in that priority order | | android/**/build.gradle[.kts], settings.gradle[.kts] | Every match found | | ios/Podfile | Existence | | tsconfig.json + **/*.{ts,tsx,js,jsx} file counts | Language classification |

The **/*.{ts,tsx,js,jsx} count excludes node_modules, dist, build, .expo, android/build, ios/Pods, ios/build, and root-level tooling config (*.config.*, .babelrc*) — a metro.config.js doesn't make a project "JavaScript."

Detection rules

  • React Native: a react-native dependency, or a metro.config.* file, or both android/ and ios/ existing together (neither alone is a signal).
  • Expo: an expo or expo-modules-core dependency.
  • React: isReactNative, or a react dependency.
  • Next.js: a next dependency (implies Node.js).
  • Express: an express dependency (implies Node.js).
  • NestJS: an @nestjs/core dependency (implies Node.js).
  • Node.js: any of the above, or an @types/node dependency.
  • Language: tsconfig.json present, or .ts/.tsx files with no .js/.jsx"typescript". .js/.jsx with no TS → "javascript". Both, no tsconfig.json"mixed". Neither → "unknown".

@devmedic/project-detection-engine builds on these signals — plus workspaces/bin/main for monorepo/CLI/library detection — to decide whether a given file even belongs to the project a rule targets. This package stays framework-detection-only; it has no notion of "rules" or "gating."

Performance

  • Parallel: every read for a fresh scan (package.json, directory structure, build files, language file counts) runs concurrently via Promise.all.
  • Cached: results are memoized in-process, keyed by resolved root path. A repeat scanProject(root) call costs a single stat on package.json to confirm nothing changed, then returns the cached ProjectContext instantly (fromCache: true).
  • Auto-invalidating: if package.json's mtime has changed since it was cached, the cache is bypassed and a fresh scan runs — catches the common case (a dependency added/removed) without a manual cache-clear. It does not catch a purely structural change (e.g. a new android/ folder) that leaves package.json untouched; call clearProjectScannerCache(root) or pass scanProject(root, { cache: false }) for that.

Depends on

  • fast-glob