Skip to content

Borrus-sudo/expressive-glob

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

💡expressive-glob

All Contributors License Last Commit Stars Forks

Philosophy

This package uses the fluent builder pattern. Its main goal is to make the somewhat cryptic vocabulary of glob patterns easy to understand!

Usage

const glob = new ExpressiveGlob();
const globString1 = glob.capture.anyChar
  .string(".jpg")
  .anyChar.upto(2)
  .from("ABCDE")
  .end.toGlob();
glob.flush();
const globString2 = glob.capture.anyChar
  .string(".png")
  .anyChar.from(2, 5)
  .invert.end.toGlob();
expect(globString1).toBe("*.jpg??[ABCDE]");
expect(globString2).toBe("*.png*[!2-5]");

Installation

yarn add expressive-glob or npm i expressive-glob

Inspiration

This project is inspired by super-expressive!

🎉 Contributing

Contributions are welcome! Whether it is a small documentation change or a breaking feature, we welcome it!

Please note: All contributions are taken under the MIT license

👥 Contributors

About

💡 Write glob patterns in super expressive and an easy way!

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published