| 11 | }; |
| 12 | |
| 13 | const write = list => { |
| 14 | try { |
| 15 | localStorage.setItem(STORAGE_KEY, JSON.stringify(list)); |
| 16 | |
| 17 | try { |
| 18 | window.dispatchEvent(new CustomEvent('favorites:updated', { detail: list })); |
| 19 | } catch { |
| 20 | // no-op |
| 21 | } |
| 22 | } catch { |
| 23 | // no-op |
| 24 | } |
| 25 | }; |
| 26 | |
| 27 | export const getSavedComponents = () => read(); |
| 28 |
no outgoing calls
no test coverage detected