signal-desktop/ts/util/removeDiacritics.ts

7 lines
205 B
TypeScript
Raw Normal View History

// 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, '');
}