📦
@simbo/globby-has-matches
A utility to glob using globby and exit early once a match is found.
Ensures further globbing is cancelled as soon as possible
Returns true as soon as a matching file is found (no need to wait for the
full scan)
Optional matcher function for custom filtering logic
Fully async, Promise-based API
Fully typed with TypeScript
Requires Node.js ^22.22.2 || ^24.15.0 || >=26.0.0.
Install @simbo/globby-has-matches from the npm registry:
npm i [-D] @simbo/globby-has-matches
For a complete API reference, see the documentation.
import { globbyHasMatches } from '@simbo/globby-has-matches';
const hasMatches = await globbyHasMatches('.changeset/*.md');
if (hasMatches) {
console.log('Found Changesets');
} else {
console.log('No Changesets found');
}