https://github.com/bigeasy/expandable
A Node.js globbing library with zsh and bash flavor shell expansions.
https://github.com/bigeasy/expandable
Last synced: about 1 month ago
JSON representation
A Node.js globbing library with zsh and bash flavor shell expansions.
- Host: GitHub
- URL: https://github.com/bigeasy/expandable
- Owner: bigeasy
- License: mit
- Created: 2013-03-03T19:19:44.000Z (about 12 years ago)
- Default Branch: master
- Last Pushed: 2019-04-17T00:38:40.000Z (about 6 years ago)
- Last Synced: 2025-03-02T01:11:22.775Z (about 2 months ago)
- Language: JavaScript
- Size: 313 KB
- Stars: 2
- Watchers: 3
- Forks: 0
- Open Issues: 7
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
Awesome Lists containing this project
README
# Expandable [](https://travis-ci.org/bigeasy/expandable)
UNIX shell style file globbing in that painlessly ports to Windows.
## Cross-Platform Wildcard Patterns
Because one of the most common argument values is a file path, **Arguable**
provides some helper functions for dealing with paths Windows. **Arguable** can
resolve UNIX file paths on Windows as if they were invoked in a UNIX shell.
**Arguable** will convert the slashes and expand wildcards. That is, it will
treat `*/*.t` as a file glob.```javascript
var arguable = require('arguable')
, frobinator = require('frobinator')
;arguable.glob(process.cwd(), [ 't/test/example.t', 't/test/*.t' ]).forEach(function (glob) {
if (!glob.files.length) {
throw new Error('file not found: ' + glob.pattern);
} else {
glob.files.forEach(function (file) {
frobinator.frobinate(1, path.resolve(glob.base, file));
});
}
});
```