(mode, state)
| 81 | // Given a mode and a state (for that mode), find the inner mode and |
| 82 | // state at the position that the state refers to. |
| 83 | export function innerMode(mode, state) { |
| 84 | let info |
| 85 | while (mode.innerMode) { |
| 86 | info = mode.innerMode(state) |
| 87 | if (!info || info.mode == mode) break |
| 88 | state = info.state |
| 89 | mode = info.mode |
| 90 | } |
| 91 | return info || {mode: mode, state: state} |
| 92 | } |
| 93 | |
| 94 | export function startState(mode, a1, a2) { |
| 95 | return mode.startState ? mode.startState(a1, a2) : true |
no outgoing calls
no test coverage detected