Skip to content

A one-of-a-kind resume builder that keeps your privacy in mind. Completely secure, customizable, portable, open-source and free forever. Try it out today!

484 B
Raw Blame
/**
 * Folds the cosmetic differences between a pasted job description and a PDF's extracted text:
 * compatibility characters, smart quotes, ligatures, and the several dashes that all mean "-".
 */
export function normalizeForMatching(value: string): string {
	return value
		.normalize("NFKC")
		.replaceAll("’", "'")
		.replaceAll("‘", "'")
		.replaceAll("“", '"')
		.replaceAll("”", '"')
		.replace(/[‐-―−]/g, "-")
		.replace(/[   ]/g, " ")
		.toLowerCase();
}