MCPcopy Index your code
hub / github.com/csev/py4e / copyState

Function copyState

tools/pythonauto/static/codemirror/codemirror.js:3525–3535  ·  view source on GitHub ↗
(mode, state)

Source from the content-addressed store, hash-verified

3523 // Utility functions for working with state. Exported because modes
3524 // sometimes need to do this.
3525 function copyState(mode, state) {
3526 if (state === true) return state;
3527 if (mode.copyState) return mode.copyState(state);
3528 var nstate = {};
3529 for (var n in state) {
3530 var val = state[n];
3531 if (val instanceof Array) val = val.concat([]);
3532 nstate[n] = val;
3533 }
3534 return nstate;
3535 }
3536 CodeMirror.copyState = copyState;
3537
3538 function startState(mode, a1, a2) {

Callers 2

highlightWorkerFunction · 0.70
getStateBeforeFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected