{"id":13507929,"url":"https://github.com/gniquil/ex_minimatch","last_synced_at":"2025-10-21T19:01:19.321Z","repository":{"id":29983498,"uuid":"33530694","full_name":"gniquil/ex_minimatch","owner":"gniquil","description":null,"archived":false,"fork":false,"pushed_at":"2022-04-15T16:14:32.000Z","size":187,"stargazers_count":13,"open_issues_count":6,"forks_count":8,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-07T14:48:33.593Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Elixir","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/gniquil.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2015-04-07T08:15:31.000Z","updated_at":"2023-09-24T00:34:05.000Z","dependencies_parsed_at":"2022-08-31T00:22:27.712Z","dependency_job_id":null,"html_url":"https://github.com/gniquil/ex_minimatch","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gniquil%2Fex_minimatch","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gniquil%2Fex_minimatch/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gniquil%2Fex_minimatch/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gniquil%2Fex_minimatch/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/gniquil","download_url":"https://codeload.github.com/gniquil/ex_minimatch/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246301963,"owners_count":20755512,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-08-01T02:00:43.589Z","updated_at":"2025-10-21T19:01:19.078Z","avatar_url":"https://github.com/gniquil.png","language":"Elixir","funding_links":[],"categories":["Files and Directories"],"sub_categories":[],"readme":"ExMinimatch\n===========\n\nGlobbing paths without walking the tree! Elixir and Erlang provide `wildcard`\nfunctions in the stdlib. But these will walk the directory tree. If you simply\nwant to test whether a file path matches a glob, ExMinimatch is for you.\n\nQuick examples:\n\n    iex\u003e import ExMinimatch\n    nil\n\n    iex\u003e match(\"**/*{1..2}{a,b}.{png,jpg}\", \"asdf/pic2a.jpg\")\n    true\n\n    iex\u003e match(\"*.+(bar|foo)\", \"bar.foo\")\n    true\n\n    iex\u003e [\"me.jpg\", \"images/me.png\", \"images/you.svg\"] |\u003e filter(\"**/*.{png,jpg}\")\n    [\"me.jpg\", \"images/me.png\"]\n\nCompiled forms below allows us to cache the %ExMinimatcher{} struct when used\nagainst large number of files repeated.\n\n    iex\u003e compile(\"**/*{1..2}{a,b}.{png,jpg}\") |\u003e match(\"asdf/pic2a.jpg\")\n    true\n\n    iex\u003e [\"me.jpg\", \"images/me.png\", \"images/you.svg\"] |\u003e filter(compile(\"**/*.{png,jpg}\"))\n    [\"me.jpg\", \"images/me.png\"]\n\nExMinimatch is a port of the [minimatch](https://github.com/isaacs/minimatch)\njavascript project. It is a close port but not exactly the same. See\n\"Comparison to minimatch.js\" section below.\n\n## Glob Patterns\n\nSupports these glob features:\n\n- [Brace Expansion](https://github.com/gniquil/ex_brace_expansion)\n- Extended glob matching\n- \"Globstar\" ** matching\n\nSee:\n\n- man sh\n- man bash\n- man 3 fnmatch\n- man 5 gitignore\n\n## Options\n\n`compile`, `match`, and `filter` all have forms that take an options argument (as a map %{}).\nThe following are the explanations. By default, all fo these are false.\n\n### log\n\nPossible values are `:info`, and `:debug`. If set, will dump information into\nrepl. `:debug` dumps more.\n\n### nobrace\n\nDo not expand `{a,b}` and `{1..3}` brace sets.\n\n### noglobstar\n\nDisable `**` matching against multiple folder names.\n\n### dot\n\nAllow patterns to match filenames starting with a period, even if the pattern\ndoes not explicitly have a period in that spot.\n\nNote that by default, `a/**/b` will not match `a/.d/b`, unless dot is set, e.g.\n`match(\"a/**/b\", \"a/.d/b\", %{dot: true})`\n\n### noext\n\nDisable \"extglob\" style patterns like `+(a|b)`.\n\n### nocase\n\nPerform a case-insensitive match.\n\n### match_base\n\nIf set, then patterns without slashes will be matched against the basename of\nthe path if it contains slashes. For example, `a?b` would match the path\n`/xyz/123/acb`, but not `/xyz/acb/123`.\n\n### nocomment\n\nSuppress the behavior of treating `#` at the start of a pattern as a comment.\n\n### nonegate\n\nSuppress the behavior of treating leading `!` character as negation.\n\n## Comparison to minimatch.js\n\n`minimatch.js` converts a glob into a list of regular expressions. However, when\nit comes to matching, one can choose to use `minimatch.match` or use the complete\nregular expression generated by `minimatch.makeRe` to test it against a file\npattern. Unfortunately, the 2 approaches are __inconsistent__. Notably the full regular\nexpression based approach has a few important pieces missing. Therefore, here\nwe implement the first approach. For detail, take a look at `ExMinimatcher.Matcher`.\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgniquil%2Fex_minimatch","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgniquil%2Fex_minimatch","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgniquil%2Fex_minimatch/lists"}