| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Name | Name | Last commit date | ||
|---|---|---|---|---|
parent directory.. | ||||
Convert extended globs to regex-compatible strings. Add (almost) the expressive power of regular expressions to glob patterns.
Install with npm
$ npm i extglob --saveUsed by micromatch.
Features
var extglob = require('extglob');
extglob('?(z)');
//=> '(?:z)?'
extglob('*(z)');
//=> '(?:z)*'
extglob('+(z)');
//=> '(?:z)+'
extglob('@(z)');
//=> '(?:z)'
extglob('!(z)');
//=> '(?!^(?:(?!z)[^/]*?)).*$'Optionally return regex
extglob('!(z)', {regex: true});
//=> /(?!^(?:(?!z)[^/]*?)).*$/To learn more about how extglobs work, see the docs for Bash pattern matching:
Install dev dependencies:
$ npm i -d && npm testPull requests and stars are always welcome. For bugs and feature requests, please create an issue
Jon Schlinkert
Copyright © 2015 Jon Schlinkert Released under the MIT license.
This file was generated by verb-cli on August 01, 2015.
| Back | FazBrowse Home | New Git URL |