No description
Find a file
Andre von Houck ede865380a
Merge pull request #11 from treeform/guzba
rename benchmark -> bench
2022-07-24 16:07:46 -07:00
.github/workflows Initial commit 2021-07-13 14:09:01 -07:00
src del + faster 2021-07-14 14:27:07 -05:00
tests rename benchmark -> bench 2022-07-24 12:44:06 -05:00
.gitignore Initial commit 2021-07-13 14:09:01 -07:00
globby.nimble 0.1.0 2021-07-14 01:16:10 -05:00
LICENSE tests + license 2021-07-13 16:36:41 -05:00
README.md Update readme. 2021-09-30 17:30:29 -07:00

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