()
| 3 | const KEY = "pbp_bookmarks_v1"; |
| 4 | |
| 5 | export function getBookmarks(): string[] { |
| 6 | if (typeof window === "undefined") return []; |
| 7 | try { |
| 8 | return (JSON.parse(localStorage.getItem(KEY) || "[]") as string[]) || []; |
| 9 | } catch { |
| 10 | return []; |
| 11 | } |
| 12 | } |
| 13 | |
| 14 | function setBookmarks(arr: string[]): void { |
| 15 | if (typeof window === "undefined") return; |
no outgoing calls
no test coverage detected