()
| 38 | window.localStorage.removeItem(namespacedKey(name)); |
| 39 | }, |
| 40 | clear(): void { |
| 41 | const prefix = namespacedKey(""); |
| 42 | const toRemove: string[] = []; |
| 43 | |
| 44 | for (let i = 0; i < window.localStorage.length; i++) { |
| 45 | const k = window.localStorage.key(i); |
| 46 | |
| 47 | if (k?.startsWith(prefix) === true) { |
| 48 | toRemove.push(k); |
| 49 | } |
| 50 | } |
| 51 | |
| 52 | for (const k of toRemove) { |
| 53 | window.localStorage.removeItem(k); |
| 54 | } |
| 55 | } |
| 56 | }; |
nothing calls this directly
no test coverage detected