jormungandr-bite/packages/backend/src/misc/normalize-for-search.ts
ThatOneCalculator 2aab2de38d refactor: 🎨 rome
2023-01-12 20:40:33 -08:00

6 lines
244 B
TypeScript

export function normalizeForSearch(tag: string): string {
// ref.
// - https://analytics-note.xyz/programming/unicode-normalization-forms/
// - https://maku77.github.io/js/string/normalize.html
return tag.normalize("NFKC").toLowerCase();
}