MCPcopy Create free account
hub / github.com/TextGeneratorio/text-generator.io / copyState

Function copyState

static/libs/codemirror.js:1365–1375  ·  view source on GitHub ↗
(mode, state)

Source from the content-addressed store, hash-verified

1363}
1364
1365function 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.

Callers 4

codemirror.jsFile · 0.85
getLineStylesFunction · 0.85
takeTokenFunction · 0.85
highlightWorkerFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected