(initial = {})
| 74 | } |
| 75 | |
| 76 | function makeStore(initial = {}) { |
| 77 | const state = { ...initial }; |
| 78 | return { |
| 79 | getState: (k) => (state[k] !== undefined ? state[k] : null), |
| 80 | setState: (k, v) => { state[k] = v; }, |
| 81 | countPending: () => 0, |
| 82 | writeInbound: () => {}, |
| 83 | writeInboundBatch: () => {}, |
| 84 | _state: state, |
| 85 | }; |
| 86 | } |
| 87 | |
| 88 | function silentLogger() { |
| 89 | return { log: () => {}, warn: () => {}, error: () => {}, info: () => {}, debug: () => {} }; |
no outgoing calls
no test coverage detected