Micromatch

Fast, POSIX-compliant glob matching for Node.js — the drop-in replacement for minimatch and multimatch.

Library
npm
v4.0.8
3,035stars
MIT License

Repository Health

Pre-computed score based on development activity, maintenance, community, maturity, and trend momentum.How we score it →
44/100Fair
Development Activity0
Maintenance20
Community56
Maturity60
Momentum40

Technical Analysis

AI-assessed by reading the actual repository — architecture, code quality, innovation, and documentation.How we score it →
78/100Good
Architecture72
Code Quality75
Innovation80
Learning Curve85

Micromatch is a highly optimized wildcard and glob matching library for JavaScript and Node.js. It matches lists of strings against one or more glob patterns and is built to be a faster, more accurate drop-in replacement for minimatch and multimatch, supporting extglobs, brace expansion, POSIX character classes, and regex character classes and groups.

It underpins file-filtering logic across a huge share of the JavaScript build and tooling ecosystem — webpack, Babel, Jest, Yarn, ESLint, stylelint, nyc, and Ava all depend on it to decide which files a glob pattern includes or excludes, so its correctness and performance directly affect the reliability of those tools.

What You Get

  • A single default export micromatch(list, patterns, options) that filters a list of strings against one or more glob patterns, including negated patterns (!foo/*.js)
  • Boolean matching helpers — isMatch, some, every, all, contains — for testing single strings or lists without building an intermediate result array
  • A matcher(pattern, options) factory that compiles a pattern once into a reusable predicate function for repeated matching in hot paths
  • Extended globbing support: extglobs (+(x|y), !(a|b)), POSIX bracket expressions ([[:alpha:][:digit:]]), regex character classes, and regex logical-or groups
  • Brace expansion (foo/{1..5}.md, bar/{a,b,c}.js) delegated to the companion braces library, with braces() and braceExpand() exposed directly
  • Utility functions for regex generation and introspection: makeRe, scan, parse, and capture for extracting captured groups from a match

Common Use Cases

  • Filtering which files a build tool (bundler, linter, test runner) should include or exclude based on glob patterns in config
  • Implementing .gitignore-style include/exclude rules for CLI tools that walk a file tree
  • Filtering object keys or arbitrary string lists by wildcard pattern with matchKeys and not
  • Compiling a glob pattern to a native RegExp via makeRe for use in custom matching pipelines

Under The Hood

Architecture — Micromatch’s own index.js is a thin orchestration layer, not the pattern-matching engine itself: it delegates regex compilation and single-pattern matching to picomatch, and brace expansion to the braces library, while owning the higher-level concerns of multi-pattern list filtering, negation semantics, and result deduplication. The core micromatch() function iterates each pattern, builds a picomatch matcher for it, and uses Set-based keep/omit accumulators to correctly resolve mixed positive and negated patterns (e.g. ['*.js', '!foo.js']) into a single filtered list, falling back to nonull/nullglob/failglob options when nothing matches. The rest of the public API (isMatch, some, every, all, contains, matchKeys, capture, makeRe, scan, parse) are largely convenience wrappers that reshape calls into picomatch invocations for different call signatures. Tech Stack — The package has exactly two runtime dependencies, braces@^3.0.3 for brace expansion and picomatch@^2.3.1 for pattern-to-regex compilation, and ships as a single unbuilt index.js file (per package.json’s files field) with no bundler or transpilation step — the published code is the source code. Development tooling is minimal: mocha for the test runner, minimatch as a devDependency for parity testing, and gulp-format-md for generating the README via the verb toolchain referenced in package.json. There is no TypeScript in the repo itself; type definitions are maintained externally via DefinitelyTyped. Code Quality — The test suite is extensive: 36 test files under test/, including per-method API tests (api.isMatch.js, api.match.js, api.some.js, etc.) and a dedicated bash.spec.js/bash.js pair that runs micromatch against Bash’s own glob-matching spec fixtures, backing the README’s claim of over 5,000 test assertions. Source code is a single, consistently styled file with JSDoc comments on every exported method, explicit TypeError throws for invalid input types (e.g. contains and all reject non-string input), and no dead or speculative code paths. API Design — The API mirrors minimatch and multimatch’s familiar call shapes closely enough that the README documents direct drop-in replacements for both (mm.isMatch() for minimatch(), mm.match() for minimatch.match()), minimizing migration friction. Every method follows the same (subject, patterns, options) argument order, and the boolean-returning helpers (isMatch, some, every, all, contains) give callers a predictable vocabulary for different matching needs without having to post-process array results.

Used by 13 apps in this directory

TypeScript
90%
Other

browserless

Developer Tools · Automation

13,605

Run headless Chrome, Firefox, and WebKit as a managed Docker service — drop-in Puppeteer and Playwright support with no infrastructure overhead.

View details
84
Repo Health
82
Technical
75
Dependency
Built with
TypeScript90%
Updated yesterday
TypeScript
98%
Apache 2.0

Codebuff

AI Code Assistants

9,981

An open-source AI coding assistant that coordinates specialized agents to edit your codebase from natural language — including Freebuff, a free, ad-supported version powered entirely by open-source models like DeepSeek and Kimi.

View details
84
Repo Health
71
Technical
68
Dependency
Built with
TypeScript98%
Updated today
JavaScript
90%
Other

CodeSandbox

Code Editors · Developer Tools

13,633

Instantly ready browser-based IDE that runs full npm dependency resolution and transpilation entirely client-side, with no server needed.

View details
65
Repo Health
76
Technical
63
Dependency
Built with
JavaScript90%
Updated 1 months ago
TypeScript
99%
Other

Dokploy

Devops · Hosting Control Panel · Security

36,702

Self-hosted PaaS that deploys apps and databases on your own VPS using Docker, Traefik, and multi-build-system orchestration

View details
89
Repo Health
76
Technical
65
Dependency
Built with
TypeScript99%
Updated yesterday
Ruby
67%
Other

GitLab

Devops · Developer Tools

24,533

The complete DevOps platform that unifies Git hosting, CI/CD, issue tracking, and security scanning into a single self-hostable application.

View details
87
Repo Health
86
Technical
70
Dependency
Built with
Ruby67%
JavaScript20%
Updated today
Scala
63%
AGPL 3.0

lila (Lichess)

Community

18,642

The forever-free, ad-free, open-source chess server powering millions of real-time games, AI analysis, puzzles, and tournaments worldwide.

View details
89
Repo Health
80
Technical
78
Dependency
Built with
Scala63%
TypeScript26%
Updated today
JavaScript
81%
MIT

localforge

AI Code Assistants · AI Agents · Developer Tools

396

A local, multi-provider AI coding agent with a real desktop and web UI — bring your own Anthropic, OpenAI, Gemini, Bedrock, or local Ollama keys and let it read, edit, and run code in your own project folder.

View details
46
Repo Health
54
Technical
72
Dependency
Built with
JavaScript81%
CSS12%
Updated 1 years ago
Clojure
54%
Other

Metabase

Analytics

48,828

The open-source BI platform that lets anyone ask questions and build dashboards without writing SQL — with an embedded analytics SDK and AI-powered query assistant included.

View details
95
Repo Health
84
Technical
65
Dependency
Built with
Clojure54%
TypeScript40%
Updated today
PHP
100%
AGPL 3.0

Passbolt API

Password Manager · Security

6,080

Self-hosted, end-to-end encrypted password manager API built for teams who demand full ownership of their credentials.

View details
92
Repo Health
80
Technical
73
Dependency
Built with
PHP100%
Updated yesterday

Join founders buildingwith open source

Opinionated takes, migration guides, cost-saving tips, and insights from the open source ecosystem.

Subscribe on Substack
Join 750+ subscribers

Search