MCPcopy Create free account
hub / github.com/Moddable-OpenSource/moddable / concatProperties

Method concatProperties

tools/mcmanifest.js:2696–2709  ·  view source on GitHub ↗
(object, properties, flag)

Source from the content-addressed store, hash-verified

2694 this.environment.BUILD_SIMULATOR = this.moddablePath + this.slash + "build" + this.slash + "simulators";
2695 }
2696 concatProperties(object, properties, flag) {
2697 if (properties) {
2698 for (let name in properties) {
2699 let property = properties[name];
2700 if (flag) {
2701 if (property instanceof Array)
2702 property = property.map(item => this.resolveSource(item));
2703 else if (typeof property == "string")
2704 property = this.resolveSource(property);
2705 }
2706 object[name] = this.concatProperty((name in object) ? object[name] : [], property);
2707 }
2708 }
2709 }
2710 concatProperty(array, value) {
2711 if ((value instanceof Array) || (typeof value == "string"))
2712 return array.concat(value);

Callers 1

mergePlatformMethod · 0.95

Calls 3

resolveSourceMethod · 0.95
concatPropertyMethod · 0.95
mapMethod · 0.80

Tested by

no test coverage detected