MCPcopy Create free account
hub / github.com/dailydotdev/apps / toggleInList

Function toggleInList

packages/shared/src/components/BookmarkFeedLayout.tsx:122–125  ·  view source on GitHub ↗
(list: string[], value: string)

Source from the content-addressed store, hash-verified

120const PAGE_SIZE = 20;
121
122const toggleInList = (list: string[], value: string): string[] =>
123 list.includes(value)
124 ? list.filter((item) => item !== value)
125 : [...list, value];
126
127/**
128 * The bookmarks page in the reader-pane frame: the saved posts are a column

Callers 1

BookmarkFeedLayoutFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected