MCPcopy Create free account
hub / github.com/callumalpass/tasknotes / removeContextFromList

Function removeContextFromList

src/components/TaskContextMenu.ts:99–106  ·  view source on GitHub ↗
(
	contexts: string[] | undefined,
	context: string
)

Source from the content-addressed store, hash-verified

97}
98
99export 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
108export function toggleContextInList(
109 contexts: string[] | undefined,

Calls 2

normalizeContextValueFunction · 0.85
normalizeContextListFunction · 0.85

Tested by

no test coverage detected