packages/path-matcher/src/compileTree.js
function preparePatternStringSegment(str) {
    if (STRING_TESTS.ARRAY.test(str)) {
        const els = str.replace(/([^\\]),/g, "$1$1,")
                       .split(/[^\\],/);
        return arrayToORRegExpStr(els.map(_transformSegment))
    } else {
        return _transformSegment(str);
    }
}
function preparePatternStringSegment(str) {
    if (STRING_TESTS.ARRAY.test(str)) {
        const els = str.replace(/([^\\]),/g, "$1$1,")
                       .split(/[^\\],/);
        return arrayToORRegExpStr(els.map(_transformSegment))
    } else {
        return _transformSegment(str);
    }
}
function preparePatternStringSegment ( str ) { if ( STRING_TESTS . ARRAY . test ( str ) ) { const els = str . replace ( / ([^\\]), / g , "$1$1," ) . split ( / [^\\], / ) ; return arrayToORRegExpStr ( els . map ( _transformSegment ) ) } else { return _transformSegment ( str ) ; } }
Prepare string to be passed through RegExp constructor while transforming
glob patterns.
Prepare string to be passed through RegExp constructor while transforming glob patterns .