Documentation for Simbo's Packages
    Preparing search index...

    Module @simbo/globby-has-matches - v1.0.3

    Globby Has Matches

    📦 @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

    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 'globby-has-matches';

    const hasMatches = await globbyHasMatches('.changesets/*.md');

    if (hasMatches) {
    console.log('Found Changesets');
    } else {
    console.log('No Changesets found');

    MIT © Simon Lepel

    Interfaces

    Options

    Type Aliases

    MatcherFunction

    Functions

    globbyHasMatches