( identifier: string, userList: string[] )
| 7 | }; |
| 8 | |
| 9 | export const isUserIncludedInList = ( |
| 10 | identifier: string, |
| 11 | userList: string[] |
| 12 | ) => { |
| 13 | const validId = ensureUserFullName(identifier); |
| 14 | for (const name of userList) { |
| 15 | if ( |
| 16 | name === ALL_USERS_USER_EMAIL || |
| 17 | name === `${userNamePrefix}${ALL_USERS_USER_EMAIL}` || |
| 18 | name === validId |
| 19 | ) { |
| 20 | return true; |
| 21 | } |
| 22 | } |
| 23 | return false; |
| 24 | }; |
| 25 | |
| 26 | export const extractEmailPrefix = (email: string, suffix: string): string => { |
| 27 | if (email.endsWith(suffix)) { |
no test coverage detected