MCPcopy Index your code
hub / github.com/ember-cli/ember-cli / eachAddonInvoke

Function eachAddonInvoke

lib/models/addon.js:467–482  ·  view source on GitHub ↗

Invoke the specified method for each enabled addon. @private @method eachAddonInvoke @param {String} methodName the method to invoke on each addon @param {Array} args the arguments to pass to the invoked method

(methodName, args)

Source from the content-addressed store, hash-verified

465 @param {Array} args the arguments to pass to the invoked method
466 */
467 eachAddonInvoke(methodName, args) {
468 this.initializeAddons();
469
470 let invokeArguments = args || [];
471
472 return this.addons.reduce((sum, addon) => {
473 let method = addon[methodName];
474 if (method) {
475 let val = method.apply(addon, invokeArguments);
476 if (val) {
477 sum.push(val);
478 }
479 }
480 return sum;
481 }, []);
482 },
483
484 /**
485 Invoke the specified method for each of the project's addons.

Callers

nothing calls this directly

Calls 1

initializeAddonsMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…