MCPcopy
hub / github.com/chartbrew/chartbrew / createStorage

Function createStorage

client/src/modules/newsFeed.test.js:12–19  ·  view source on GitHub ↗
(initialValue)

Source from the content-addressed store, hash-verified

10} from "./newsFeed.js";
11
12function createStorage(initialValue) {
13 const data = new Map(initialValue ? [["__cb_news_seen_ids", initialValue]] : []);
14
15 return {
16 getItem: (key) => data.get(key) || null,
17 setItem: (key, value) => data.set(key, value),
18 };
19}
20
21test("normalizeNewsFeed keeps only renderable news items", () => {
22 const items = normalizeNewsFeed({

Callers 1

newsFeed.test.jsFile · 0.85

Calls 2

getMethod · 0.45
setMethod · 0.45

Tested by

no test coverage detected