MCPcopy Create free account
hub / github.com/PeachScript/vue-infinite-loading / fakeBox

Function fakeBox

test/unit/utils.js:33–47  ·  view source on GitHub ↗
(fn, cb)

Source from the content-addressed store, hash-verified

31 * @param {Function} cb fake function
32 */
33export function fakeBox(fn, cb) {
34 let result;
35
36 if (fakeCache) {
37 result = fakeCache;
38 fakeCache = null;
39 } else {
40 fakeCache = fn;
41 result = (...args) => {
42 cb(...args);
43 };
44 }
45
46 return result;
47}
48
49export default {
50 isShow,

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…