A lightweight library for matching and replacing strings using glob patterns. Version 0.4.0 provides a rule-based engine with custom asterisk semantics (****, ***, **, *) and expression-based replacements. It supports path parsing, extensible rules, and callbacks. The package is minimal compared to alternatives like glob or fast-glob, offering a unique replacement syntax using {expressions} and glob array indexing. Suitable for build pipelines or custom path transformations. Release cadence is low; appears to be a niche tool maintained on GitHub.
npm install glob-pathNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Shows basic rule matching: match any path ending in .txt and redirect to backup/ folder preserving path and basename.
Refer to documentation for correct pattern usage; test patterns against expected behavior.
Always return a string from callback to stop rule processing, or omit return to let next rule handle.
Update to v0.4.0 and adjust code to use class-based API.
Consider using more maintained alternatives like glob or fast-glob.
Use named import: import { Glob } from 'glob-path' then const glob = new Glob()Ensure pattern uses ****, ***, **, or * correctly; test with glob.parse or simpler patterns.
Use: const glob = new Glob(); then glob.addRule(...)
No dependency data recorded yet.