function Skip({ exclude, include }) {
	const excludeFiles = (exclude ? exclude.split(",") : []).map((p) => p.trim());
	const includeFiles = (include ? include.split(",") : ["**"]).map((p) =>
		p.trim(),
	);

	/**
	 * Tests whether a file should be skipped based on exclusion and inclusion patterns.
	 *
	 * @param {object} file - The file to be tested.
	 * @param {string} file.path - The relative URL of the file.
	 * @returns {boolean} - Returns true if the file should be skipped, false otherwise.
	 */
	function test(file) {
		if (!file.path) return false;
		const match = (pattern) =>
			minimatch(file.path, pattern, { matchBase: true });
		return excludeFiles.some(match) || !includeFiles.some(match);
	}

	return {
		test,
	};
}
Creates a skip function that filters files based on exclusion and inclusion patterns.

@param {object} arg - The exclusion patterns separated by commas.
@param {string} arg.exclude - The exclusion patterns separated by commas.
@param {string} arg.include - The inclusion patterns separated by commas.