{"id":32191107,"url":"https://github.com/suprematic/globus","last_synced_at":"2026-03-02T11:37:07.719Z","repository":{"id":62943713,"uuid":"563307094","full_name":"suprematic/globus","owner":"suprematic","description":"Bash-like globbing patterns for Clojure(Script).","archived":false,"fork":false,"pushed_at":"2024-04-16T21:08:43.000Z","size":33,"stargazers_count":13,"open_issues_count":0,"forks_count":1,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-10-18T13:32:35.660Z","etag":null,"topics":["glob","globbing","wildcards"],"latest_commit_sha":null,"homepage":"","language":"Clojure","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"epl-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/suprematic.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2022-11-08T10:44:34.000Z","updated_at":"2024-04-17T19:58:53.000Z","dependencies_parsed_at":"2025-10-22T01:32:11.253Z","dependency_job_id":null,"html_url":"https://github.com/suprematic/globus","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"purl":"pkg:github/suprematic/globus","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/suprematic%2Fglobus","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/suprematic%2Fglobus/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/suprematic%2Fglobus/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/suprematic%2Fglobus/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/suprematic","download_url":"https://codeload.github.com/suprematic/globus/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/suprematic%2Fglobus/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":280365539,"owners_count":26318383,"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","status":"online","status_checked_at":"2025-10-21T02:00:06.614Z","response_time":58,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["glob","globbing","wildcards"],"created_at":"2025-10-22T01:32:02.208Z","updated_at":"2025-10-22T01:32:41.116Z","avatar_url":"https://github.com/suprematic.png","language":"Clojure","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Globus\n\n[![Clojars Project](https://img.shields.io/clojars/v/io.github.suprematic/globus.svg)](https://clojars.org/io.github.suprematic/globus)\n[![cljdoc badge](https://cljdoc.org/badge/io.github.suprematic/globus)](https://cljdoc.org/d/io.github.suprematic/globus)\n\nBash-like globbing patterns for Clojure(Script).\n\nSupported pattern language constructs:\n\n* `?`: matches any single character\n* `*`: matches any string, including the empty string\n* `[qwe]`: matches any single character in `#{\\q \\w \\e}`\n* `[^qwe]` or `[!qwe]`: matches any single character _not_ in `#{\\q \\w \\e}`\n* `[a-f]`: matches any single character between `\\a` and `\\f` (inclusive)\n* `{one,two,three}`: matches anything that any of the patterns `one`, `two`\n  and `three` would match. This one is has slightly different semantics\n  than what e.g. bash does (because in bash curly braces are not actually a\n  part of the matching engine)\n\nSee the [tests](test/globus/) for more details and examples.\n\n## Usage\n\n```clojure\n(require '[globus.core :as glob])\n\n;; check if a string is a glob pattern (contains special symbols)\n(glob/glob? \"abc\") ; =\u003e false\n(glob/glob? \"ab?c\") ; =\u003e true\n\n;; filter a sequence of strings\n(glob/glob \"a*\" [\"aaa\" \"bb\" \"cccc\" \"defg\"]) ; =\u003e (\"aaa\")\n(glob/glob \"[^a]???\" [\"aaa\" \"bb\" \"cccc\" \"defg\"]) ; =\u003e (\"cccc\" \"defg\")\n\n;; ignorecase\n(glob/glob \"A*\" [\"aaa\" \"bb\" \"cccc\" \"defg\"]) ; =\u003e ()\n(glob/glob \"A*\" [\"aaa\" \"bb\" \"cccc\" \"defg\"] {:ignorecase true}) ; =\u003e (\"aaa\")\n\n;; convert a pattern to a (string representation of a) regular expression\n(glob/pattern-\u003eregex \"{a.*,*b}\") ; =\u003e \"(?:(?:a\\\\..*)|(?:.*b))\"\n\n;; enumerate all possible expansions of a pattern\n(glob/explode \"[ab]{cd,efg,hi[j-m]}\")\n; =\u003e\n; [\"acd\"\n;  \"aefg\"\n;  \"ahij\"\n;  \"ahik\"\n;  \"ahil\"\n;  \"ahim\"\n;  \"bcd\"\n;  \"befg\"\n;  \"bhij\"\n;  \"bhik\"\n;  \"bhil\"\n;  \"bhim\"]\n\n;; that fails for patterns that cannot be expanded (contain `*`, `?` or\n;; `[^...])\n(glob/explode \"abc*\") ; Exception is thrown\n```\n\n## Contributing\n\nRun the project's tests:\n\n    $ clojure -T:build test\n    $ clojure -T:build test-node # ClojureScript tests\n\n## License\n\nCopyright © 2022-2024 Suprematic\n\nDistributed under the Eclipse Public License.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsuprematic%2Fglobus","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsuprematic%2Fglobus","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsuprematic%2Fglobus/lists"}