Skip to content

Commit

Permalink
update examples
Browse files Browse the repository at this point in the history
  • Loading branch information
jonschlinkert committed May 31, 2017
1 parent e12fb36 commit e47fc91
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 6 deletions.
14 changes: 10 additions & 4 deletions examples/braces.js
Expand Up @@ -4,15 +4,21 @@ var mm = require('../');
* Brace optimization
*/

console.log(mm.braces('{a,b,c}/{001..100}'));
//=> [ '{a,b,c}/{1..100}' ]
// console.log(mm.braces('{a,b,c}/{001..100}'));
// => [ '{a,b,c}/{1..100}' ]

/**
* Brace expansion
*/

console.log(mm.braceExpand('{a,b,c}/{001..100}'));
// console.log(mm.braceExpand('{a,b,c}/{001..100}'));
//=> ['a/a', 'a/b', 'a/c', 'a/d', 'a/e', 'b/a', 'b/b', 'b/c', 'b/d', 'b/e', 'c/a', 'c/b', 'c/c', 'c/d', 'c/e']

console.log(mm.braces('{a,b,c}/{001..100}', {expand: true}));
// console.log(mm.braces('{a,b,c}/{001..100}', {expand: true}));
//=> [ 'foo/a/bar', 'foo/b/bar' ]


console.log(mm.makeRe('foo*{/*,}'));
console.log(mm.makeRe('foo*{/*,*}'));
console.log(mm.makeRe('foo*{!([B-C]),!([x-z])}'));
console.log(mm.makeRe('{!(a|b),!(c|d)}'));
8 changes: 6 additions & 2 deletions examples/negation.js
@@ -1,3 +1,7 @@
var mm = require('../');
var mm = require('..');

console.log(mm('!**/a.js').ast);
console.log(mm(['bar/bar'], ['foo/**', '!foo/baz']));
console.log(mm(['bar/bar'], ['!foo/baz', 'foo/**']));
console.log(mm(['bar/bar'], ['!**', '!foo/baz', 'foo/**']));
console.log(mm(['bar/bar'], ['**', '!foo/baz', 'foo/**']));
console.log(mm(['bar/bar'], ['!foo/baz', 'foo/**']));

0 comments on commit e47fc91

Please sign in to comment.