498
499
// common patterns: **/something/else just need endsWith check, something/else just needs and equals check
500
>
function trivia4and5(targetPath: string, pattern: string, matchPathEnds: boolean, options: IGlobOptionsInternal): ParsedStringPattern {
glob.ts
501
>
const usingPosixSep = sep === posix.sep;
502
>
const nativePath = usingPosixSep ? targetPath : targetPath.replace(ALL_FORWARD_SLASHES, sep);
503
>
const nativePathEnd = sep + nativePath;
504
>
const targetPathEnd = posix.sep + targetPath;
505
>
506
>
let parsedPattern: ParsedStringPattern;
507
>
if (matchPathEnds) {
508
parsedPattern = function (path: string, basename?: string) {
509
return typeof path === 'string' && (