Jitsi Meet - Secure, Simple and Scalable Video Conferences that you use as a standalone app or embed in your web application.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 
jitsi-meet/react/features/base/util/strings.web.ts

20 lines
652 B

/**
* Applies NFKC normalization to the given text.
*
* @param {string} text - The text that needs to be normalized.
* @returns {string} - The normalized text.
*/
export function normalizeNFKC(text: string) {
return text.normalize('NFKC');
}
/**
* Replaces accent characters with english alphabet characters.
* NOTE: Here we use the unorm package because the JSC version in React Native for Android crashes.
*
* @param {string} text - The text that needs to be normalized.
* @returns {string} - The normalized text.
*/
export function normalizeAccents(text: string) {
return text.normalize('NFD').replace(/[\u0300-\u036f]/g, '');
}