(message: string)
| 43 | } |
| 44 | |
| 45 | export const slugify = (message: string) => { |
| 46 | let slug = message |
| 47 | .replace(/[^A-Za-z0-9\s]/g, ' ') |
| 48 | .replace(/[^\w\s$*_+~.()'"!\-:@]+/g, '') |
| 49 | .trim() |
| 50 | .replace(/\s+/g, '-') |
| 51 | .substring(0, 60) |
| 52 | .toLowerCase(); |
| 53 | if (slug === '') { |
| 54 | return 'conversation'; |
| 55 | } |
| 56 | return slug; |
| 57 | }; |
| 58 | |
| 59 | function isLetter(character: string): boolean { |
| 60 | return character.toLowerCase() !== character.toUpperCase(); |
no outgoing calls
no test coverage detected