()
| 37 | } |
| 38 | |
| 39 | keys(): string[] { |
| 40 | const { length } = localStorage; |
| 41 | const keys: string[] = []; |
| 42 | for (let i = 0; i < length; i++) { |
| 43 | const key = localStorage.key(i); |
| 44 | if (key && key.startsWith(this.keyPrefix)) { |
| 45 | keys.push(key); |
| 46 | } |
| 47 | } |
| 48 | return keys; |
| 49 | } |
| 50 | |
| 51 | clear() { |
| 52 | const keys = this.keys(); |