MCPcopy Create free account
hub / github.com/DavidHDev/react-bits / read

Function read

src/utils/favorites.js:3–11  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

1const STORAGE_KEY = 'savedComponents';
2
3const read = () => {
4 try {
5 const raw = localStorage.getItem(STORAGE_KEY);
6 const parsed = raw ? JSON.parse(raw) : [];
7 return Array.isArray(parsed) ? parsed.filter(x => typeof x === 'string') : [];
8 } catch {
9 return [];
10 }
11};
12
13const write = list => {
14 try {

Callers 5

getSavedComponentsFunction · 0.70
isComponentSavedFunction · 0.70
addSavedComponentFunction · 0.70
removeSavedComponentFunction · 0.70
toggleSavedComponentFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected