962 B
962 B
{%= name %} {%= badge("fury") %}
{%= description %}
{%= include("install-npm", {save: true}) %}
Usage
var parse = require('{%= name %}');
// this is a nonsensical pattern, but it shows what this lib does
parse('a/b/{c,.gitignore,{a,b}}/{a,b}/*.foo.js');
Returns:
{ pattern: 'a/b/{c,.gitignore,{a,b}}/{a,b}/*.foo.js',
dirname: 'a/b/{c,.gitignore,{a,b}}/{a,b}/',
filename: '*.foo.js',
basename: '*',
extname: '.foo.js',
ext: 'js',
// detects when a glob pattern intentionally
// specifies dotfiles
dotfiles: false,
dotdirs: false }
See the tests for hundreds of examples.
Run tests
Install dev dependencies:
npm i -d && npm test
Contributing
Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue]({%= bugs.url %})
Author
{%= include("author") %}
License
{%= copyright() %} {%= license() %}
{%= include("footer") %}