(initial: Record<string, string> = {})
| 18 | } from './reader-level-store'; |
| 19 | |
| 20 | function memoryStore(initial: Record<string, string> = {}): KeyValueStore & { data: Record<string, string> } { |
| 21 | const data = { ...initial }; |
| 22 | return { |
| 23 | data, |
| 24 | getItem: (key) => (key in data ? data[key] : null), |
| 25 | setItem: (key, value) => { |
| 26 | data[key] = value; |
| 27 | }, |
| 28 | }; |
| 29 | } |
| 30 | |
| 31 | const lockedStore: KeyValueStore = { |
| 32 | getItem: () => { |
no outgoing calls
no test coverage detected