Mirror of https://github.com/roostorg/coop github.com/roostorg/coop
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

at 557ff54b2b435e5f1e789c6a8a4e1bebf2d7deb6 11 lines 423 B view raw
1// Solution from https://stackoverflow.com/questions/10992921/how-to-remove-emoji-code-using-javascript 2export function stripEmojis(input: string) { 3 return input.replace( 4 /(?![*#0-9]+)[\p{Emoji}\p{Emoji_Modifier}\p{Emoji_Component}\p{Emoji_Modifier_Base}\p{Emoji_Presentation}]/gu, 5 '', 6 ); 7} 8 9export function replaceEmptyStringWithNull(input: string | null | undefined) { 10 return input === '' ? null : input; 11}