Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
module.exports = function(extglob) {
var star = extglob.options.star || '.*?';
/**
* Use `expand-brackets` compilers
*/
extglob.use(brackets.compilers);
extglob.compiler
/**
* Escaped: "\\*"
*/
.set('escape', function(node) {
return this.emit(node.val, node);
})
/**
* Dot: "."
*/
.set('dot', function(node) {
return this.emit('\\' + node.val, node);
function parsers(extglob) {
extglob.state = extglob.state || {};
/**
* Use `expand-brackets` parsers
*/
extglob.use(brackets.parsers);
extglob.parser.sets.paren = extglob.parser.sets.paren || [];
extglob.parser
/**
* Extglob open: "*("
*/
.capture('paren.open', function() {
var parsed = this.parsed;
var pos = this.position();
var m = this.match(/^([!@*?+])?\(/);
if (!m) return;
var prev = this.prev();
var prefix = m[1];
var val = m[0];
function parsers(extglob) {
extglob.state = extglob.state || {};
/**
* Use `expand-brackets` parsers
*/
extglob.use(brackets.parsers);
extglob.parser.sets.paren = extglob.parser.sets.paren || [];
extglob.parser
/**
* Extglob open: "*("
*/
.capture('paren.open', function () {
var parsed = this.parsed;
var pos = this.position();
var m = this.match(/^([!@*?+])?\(/);
if (!m) return;
var prev = this.prev();
var prefix = m[1];
var val = m[0];