MCPcopy Create free account
hub / github.com/ampproject/amphtml / caller

Function caller

test/unit/utils/test-display-observer.js:93–100  ·  view source on GitHub ↗
(value)

Source from the content-addressed store, hash-verified

91 const results = [];
92 let deferred = null;
93 const caller = (value) => {
94 results.push(value);
95 if (deferred) {
96 const next = results.shift();
97 deferred.resolve(next);
98 deferred = null;
99 }
100 };
101 caller.next = () => {
102 if (results.length > 0) {
103 const next = results.shift();

Callers

nothing calls this directly

Calls 2

resolveMethod · 0.80
pushMethod · 0.45

Tested by

no test coverage detected