globby

Globby - Glob pattern matching for Nim.

Pure Nim score 30/100 · tests present · docs generated

Summary

Latest Version 0.1.0
License MIT
CI Status Failing
Downloads 0
Last Indexed 2026-09-03 07:22

Tags

Authors

  • Andre von Houck

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

Dependencies

Package Version Optional
nim >= 1.4.6 No

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

Github Actions

API reference

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