(mode, state)
| 1363 | } |
| 1364 | |
| 1365 | function copyState(mode, state) { |
| 1366 | if (state === true) { return state } |
| 1367 | if (mode.copyState) { return mode.copyState(state) } |
| 1368 | var nstate = {}; |
| 1369 | for (var n in state) { |
| 1370 | var val = state[n]; |
| 1371 | if (val instanceof Array) { val = val.concat([]); } |
| 1372 | nstate[n] = val; |
| 1373 | } |
| 1374 | return nstate |
| 1375 | } |
| 1376 | |
| 1377 | // Given a mode and a state (for that mode), find the inner mode and |
| 1378 | // state at the position that the state refers to. |
no outgoing calls
no test coverage detected