signal-desktop/ts/util/removeDiacritics.ts

6 lines
205 B
TypeScript

// Copyright 2023 Signal Messenger, LLC
// SPDX-License-Identifier: AGPL-3.0-only
export function removeDiacritics(text: string): string {
return text.normalize('NFD').replace(/\p{Diacritic}/gu, '');
}