How to use the makeRe function from minimatch

Find comprehensive JavaScript minimatch.makeRe code examples handpicked from public code repositorys.

54
55
56
57
58
59
60
61
62
63
  .add('minimatch', () => minimatch.braceExpand('foo/{1..250}/bar'))
  .run();

bench('expand - range (optimized for regex)')
  .add('   braces', () => braces.compile('foo/{1..250}/bar'))
  .add('minimatch', () => minimatch.makeRe('foo/{1..250}/bar'))
  .run();

bench('expand - nested ranges (expanded)')
  .add('   braces', () => braces.expand('foo/{a,b,{1..250}}/bar'))
fork icon24
star icon172
watch icon8

+ 7 other calls in file

555
556
557
558
559
560
561
562
563
564
    if (module.options.csrfExceptions) {
      list = list.concat(module.options.csrfExceptions.map(path => module.getRouteUrl(path)));
    }
  }
  self.csrfExceptions = list.map(function (e) {
    return minimatch.makeRe(e);
  });
},

// See the `csrf` middleware which checks for exceptions first. This method
fork icon0
star icon0
watch icon0