MCPcopy
hub / github.com/pqina/filepond / dispatch

Function dispatch

src/js/app/frame/createStore.js:40–58  ·  view source on GitHub ↗
(type, data, isBlocking)

Source from the content-addressed store, hash-verified

38
39 // adds a new action, calls its handler and
40 const dispatch = (type, data, isBlocking) => {
41
42 // is blocking action (should never block if document is hidden)
43 if (isBlocking && !document.hidden) {
44 dispatchQueue.push({ type, data });
45 return;
46 }
47
48 // if this action has a handler, handle the action
49 if (actionHandlers[type]) {
50 actionHandlers[type](data);
51 }
52
53 // now add action
54 actionQueue.push({
55 type,
56 data
57 });
58 };
59
60 const query = (str, ...args) =>
61 queryHandles[str] ? queryHandles[str](...args) : null;

Callers 11

processDispatchQueueFunction · 0.70
listUpdatedFunction · 0.50
actionsFunction · 0.50
uploadFunction · 0.50
handleAddFunction · 0.50
loadCompleteFunction · 0.50
processNowFunction · 0.50
processNextFunction · 0.50
removeFromViewFunction · 0.50
handleRevertFunction · 0.50
createOptionActionsFunction · 0.50

Calls

no outgoing calls

Tested by

no test coverage detected