Skip to content

Export a function to check if a path matches a pattern #146

@sdorra

Description

@sdorra

First of all, thank you for the great library. I'm using tinyglobby in one of my projects to collect files from a directory. After I collect them, I start watching that directory for changes. Whenever a change occurs, I need to check if the modified path matches the same pattern used to collect the files with tinyglobby. I have used picomatch to verify the path against the pattern since it is the same library used by tinyglobby. However, it seems that tinyglobby does more than just checking the raw path with picomatch. There are cases where tinyglobby matches a file, but the check with picomatch fails (e.g., sdorra/content-collections#602). It would be helpful if tinyglobby could export a function that allows checking if a path matches a pattern, using the same logic as the main function to match the path.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions