MCPcopy Create free account
hub / github.com/easeway/js-plugins / complete

Function complete

lib/Plugins.js:152–164  ·  view source on GitHub ↗
(instances)

Source from the content-addressed store, hash-verified

150 };
151
152 var complete = function (instances) {
153 var err = instances.length == 0 && options.required ? new Error('Extension not found for ' + extensionPoint) : null;
154 if (options.multi) {
155 callback(err,
156 instances.map(function (inst) { return inst.instance; }),
157 instances.map(function (inst) { return inst.name; })
158 );
159 } else if (instances[0]) {
160 callback(err, instances[0].instance, instances[0].name);
161 } else {
162 callback(err, null, null);
163 }
164 };
165
166 var instantiate = options.multi ? function (names) {
167 flow.each(names).map(function (name, next) {

Callers 1

Plugins.jsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected