( contexts: string[] | undefined, context: string )
| 97 | } |
| 98 | |
| 99 | export function removeContextFromList( |
| 100 | contexts: string[] | undefined, |
| 101 | context: string |
| 102 | ): string[] | undefined { |
| 103 | const value = normalizeContextValue(context); |
| 104 | const remaining = normalizeContextList(contexts).filter((entry) => entry !== value); |
| 105 | return remaining.length > 0 ? remaining : undefined; |
| 106 | } |
| 107 | |
| 108 | export function toggleContextInList( |
| 109 | contexts: string[] | undefined, |
no test coverage detected