Wrapper for [braces] to enable brace expansion for arrays of patterns.
npm install expand-braces> Wrapper for [braces] to enable brace expansion for arrays of patterns.
Install with npm
``sh`
$ npm i expand-braces --save
`js`
var expand = require('expand-braces');
Pass an array or list of strings:
`js`
expand('{foo,bar}', '{baz,quux}');
// or
expand(['{foo,bar}', '{baz,quux}']);
// both yield => [ 'foo', 'bar', 'baz', 'quux' ];
Pass a function as the last argument to customize output:
`js
expand(['{a..e}', '{f..h}'], function (str) {
return '_' + str;
});
//=> ['_a', '_b', '_c', '_d', '_e', '_f', '_g', '_h']
`
* braces: Fastest brace expansion for node.js, with the most complete support for the Bash 4.3 braces… more | homepage
* is-glob: Returns true if the given string looks like a glob pattern or an extglob pattern.… more | homepage
* micromatch: Glob matching for javascript/node.js. A drop-in replacement and faster alternative to minimatch and multimatch. Just… more | homepage
Install dev dependencies:
`sh``
$ npm i -d && npm test
Pull requests and stars are always welcome. For bugs and feature requests, please create an issue.
Jon Schlinkert
+ github/jonschlinkert
+ twitter/jonschlinkert
Copyright © 2015 Jon Schlinkert
Released under the MIT license.
*
_This file was generated by verb-cli on October 31, 2015._