globby
Glob pattern matching for Nim.
Summary
| Latest Version | Unknown |
|---|---|
| License | MIT |
| CI Status | Passing |
| Downloads | 0 |
| Last Indexed | 2026-07-21 05:24 |
Tags
Installation
nimble install globby
choosenim install globby
git clone https://github.com/treeform/globby
OS Compatibility
| Platform | Linux | macOS | Windows | FreeBSD | OpenBSD | NetBSD | Android | iOS | WASM | Embedded |
|---|---|---|---|---|---|---|---|---|---|---|
| globby | ✓ | ✓ | ✓ | - | - | - | - | - | - | - |
Source
| Repository | https://github.com/treeform/globby |
|---|---|
| Homepage | https://github.com/treeform/globby |
| Documentation | View Documentation |
| Registry Source | nimble_official |
README
Globby - Glob pattern matching for Nim.
nimble install globby
This library has no dependencies other than the Nim standard libarary.
About
This allows you to create a data structure that you can then access using globs. This library is being actively developed and we'd be happy for you to use it.
Supported patterns:
| Done | Format | Example |
|---|---|---|
| ✅ | Star | foo* |
| ✅ | Single Character | foo?? |
| ✅ | Character Set | foo[abs] |
| ✅ | Character Range | foo[a-z] |
| ✅ | Star Path | foo/*/bar |
| ✅ | Double Star Path | foo/**/bar |
| ✅ | Root Path | /foo/bar |
| ✅ | Relative Path | ../foo/bar |
Example:
import globby, sequtils
var tree = GlobTree[int]()
tree.add("foo/bar/baz", 0)
tree.add("foo/bar/baz/1", 1)
tree.add("foo/bar/baz/2", 2)
tree.add("foo/bar/baz/z", 3)
tree.add("foo/bar/baz/z", 4)
assert toSeq(tree.findAll("foo/bar/baz/z"))[0] == 3