src/vs/base/common/glob.ts/trivia2
function trivia2(base: string, originalPattern: string): ParsedStringPattern {
	const slashBase = `/${base}`;
	const backslashBase = `\\${base}`;
	const parsedPattern: ParsedStringPattern = function (path, basename) {
		if (typeof path !== 'string') {
			return null;
		}
		if (basename) {
			return basename === base ? originalPattern : null;
		}
		return path === base || path.endsWith(slashBase) || path.endsWith(backslashBase) ? originalPattern : null;
	};
	const basenames = [base];
	parsedPattern.basenames = basenames;
	parsedPattern.patterns = [originalPattern];
	parsedPattern.allBasenames = basenames;
	return parsedPattern;
}