parse-glob
Parse a glob pattern into an object of path parts.
Install with npm
npm i parse-glob --save
Usage
var parse = require('parse-glob');
parse('a/b/{c,.gitignore,{a,b}}/{a,b}/*.foo.js');
Returns:
{ isGlob: true,
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',
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
Author
Jon Schlinkert
License
Copyright (c) 2015 Jon Schlinkert
Released under the MIT license
This file was generated by verb on February 10, 2015.