MCPcopy Index your code
hub / github.com/Moddable-OpenSource/moddable / process

Method process

tools/mcpack.js:1371–1427  ·  view source on GitHub ↗
(property)

Source from the content-addressed store, hash-verified

1369 noFilesMatch(target) {
1370 }
1371 process(property) {
1372 var tool = this.tool;
1373 var target = "~";
1374 if (target in property) {
1375 var sources = property[target];
1376 if (sources instanceof Array) {
1377 for (var source of sources)
1378 this.iterate(target, source, false, true);
1379 }
1380 else
1381 this.iterate(target, sources, false, true);
1382 }
1383 for (var target in property) {
1384 var sources = property[target];
1385 if (target == "~") {
1386 }
1387 else {
1388 target = tool.resolvePrefix(target);
1389 target = tool.resolveSlash(target);
1390 var slash = target.lastIndexOf(tool.slash);
1391 if (slash >= 0)
1392 this.appendTarget(target.slice(0, slash));
1393 var star = target.lastIndexOf("*");
1394 if (star >= 0) {
1395 var suffix = target.slice(star + 1);
1396 target = target.slice(0, star);
1397 if (sources instanceof Array) {
1398 for (var source of sources) {
1399 if (source) {
1400 if (typeof source == "string")
1401 source = tool.resolveSlash(source);
1402 else
1403 source.source = tool.resolveSlash(source.source);
1404 this.iterate(target, source, true, suffix, false);
1405 }
1406 }
1407 }
1408 else
1409 this.iterate(target, sources, true, suffix, false);
1410 }
1411 else {
1412 var suffix = ""
1413 var pipe = target.lastIndexOf("|");
1414 if (pipe >= 0) {
1415 var suffix = target.slice(pipe + 1);
1416 target = target.slice(0, pipe);
1417 }
1418 if (sources instanceof Array) {
1419 for (var source of sources)
1420 this.iterate(target, source, true, suffix, true);
1421 }
1422 else
1423 this.iterate(target, sources, true, suffix, true);
1424 }
1425 }
1426 }
1427 }
1428};

Callers 8

runMethod · 0.45
runMethod · 0.45
getBuiltinsMethod · 0.45
runMethod · 0.45
runMethod · 0.45
testvectors.jsFile · 0.45
main.jsFile · 0.45
testCipherModeFunction · 0.45

Calls 5

iterateMethod · 0.95
appendTargetMethod · 0.95
sliceMethod · 0.65
resolvePrefixMethod · 0.45
resolveSlashMethod · 0.45

Tested by

no test coverage detected