MCPcopy Index your code
hub / github.com/Macuyiko/minecraft-python / copyValue

Function copyValue

ServerEditorWeb/ace/ext-language_tools.js:283–296  ·  view source on GitHub ↗
(val)

Source from the content-addressed store, hash-verified

281 tabstops.forEach(function(ts) {ts.length = 0});
282 var expanding = {};
283 function copyValue(val) {
284 var copy = [];
285 for (var i = 0; i < val.length; i++) {
286 var p = val[i];
287 if (typeof p == "object") {
288 if (expanding[p.tabstopId])
289 continue;
290 var j = val.lastIndexOf(p, i - 1);
291 p = copy[j] || {tabstopId: p.tabstopId};
292 }
293 copy[i] = p;
294 }
295 return copy;
296 }
297 for (var i = 0; i < tokens.length; i++) {
298 var p = tokens[i];
299 if (typeof p != "object")

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected