Faster brace expansion for node.js. Besides being faster, braces is not subject to DoS attacks like minimatch, is more accurate, and has more complete support for Bash 4.3.
$ npm t
> braces@0.1.4 test /Users/isaacs/dev/js/minimatch/braces
> mocha -R spec
braces
brace expansion
✓ should work with no braces
✓ should work with one value
✓ should work with nested non-sets
✓ should work with commas.
✓ should expand sets
✓ should expand multiple sets
✓ should expand nested sets
✓ should expand with globs.
✓ should throw an error when imbalanced braces are found.
range expansion
✓ should expand numerical ranges
✓ should honor padding
✓ should expand alphabetical ranges
1) should use a custom function for expansions.
complex
✓ should expand a complex combination of ranges and sets:
✓ should expand a combination of nested sets and ranges:
14 passing (13ms)
1 failing
1) braces range expansion should use a custom function for expansions.:
AssertionError: expected [ '\u000097', '\u000098', '\u000099', '\u0000100', '\u0000101' ] to equal [ 'a0', 'b1', 'c2', 'd3', 'e4' ] (at '0', A has '\u000097' and B has 'a0')
+ expected - actual
[
+ "a0"
+ "b1"
+ "c2"
+ "d3"
+ "e4"
- "\u000097"
- "\u000098"
- "\u000099"
- "\u0000100"
- "\u0000101"
]
at Assertion.fail (/Users/isaacs/dev/js/minimatch/braces/node_modules/should/lib/assertion.js:113:17)
at Assertion.prop.(anonymous function) [as eql] (/Users/isaacs/dev/js/minimatch/braces/node_modules/should/lib/assertion.js:39:14)
at Context.<anonymous> (/Users/isaacs/dev/js/minimatch/braces/test.js:87:20)
at callFn (/Users/isaacs/dev/js/minimatch/braces/node_modules/mocha/lib/runnable.js:250:21)
at Test.Runnable.run (/Users/isaacs/dev/js/minimatch/braces/node_modules/mocha/lib/runnable.js:243:7)
at Runner.runTest (/Users/isaacs/dev/js/minimatch/braces/node_modules/mocha/lib/runner.js:373:10)
at /Users/isaacs/dev/js/minimatch/braces/node_modules/mocha/lib/runner.js:451:12
at next (/Users/isaacs/dev/js/minimatch/braces/node_modules/mocha/lib/runner.js:298:14)
at /Users/isaacs/dev/js/minimatch/braces/node_modules/mocha/lib/runner.js:308:7
at next (/Users/isaacs/dev/js/minimatch/braces/node_modules/mocha/lib/runner.js:246:23)
at Object._onImmediate (/Users/isaacs/dev/js/minimatch/braces/node_modules/mocha/lib/runner.js:275:5)
at processImmediate [as _immediateCallback] (timers.js:330:15)
npm ERR! Test failed. See above for more details.