MCPcopy Index your code
hub / github.com/easydiffusion/easydiffusion / dispatch

Function dispatch

ui/plugins/ui/jasmine/jasmine.js:7261–7284  ·  view source on GitHub ↗
(method, args)

Source from the content-addressed store, hash-verified

7259 return this
7260
7261 function dispatch(method, args) {
7262 if (reporters.length === 0 && fallbackReporter !== null) {
7263 reporters.push(fallbackReporter)
7264 }
7265 const fns = []
7266 for (const reporter of reporters) {
7267 addFn(fns, reporter, method, args)
7268 }
7269
7270 return new Promise(function(resolve) {
7271 queueRunnerFactory({
7272 queueableFns: fns,
7273 onComplete: resolve,
7274 isReporter: true,
7275 onMultipleDone: function() {
7276 onLateError(
7277 new Error(
7278 "An asynchronous reporter callback called its 'done' callback " + "more than once."
7279 )
7280 )
7281 },
7282 })
7283 })
7284 }
7285
7286 function addFn(fns, reporter, method, args) {
7287 const fn = reporter[method]

Callers 1

ReportDispatcherFunction · 0.85

Calls 3

addFnFunction · 0.85
queueRunnerFactoryFunction · 0.85
pushMethod · 0.80

Tested by

no test coverage detected