(fn, cb)
| 31 | * @param {Function} cb fake function |
| 32 | */ |
| 33 | export 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 | |
| 49 | export default { |
| 50 | isShow, |
no outgoing calls
no test coverage detected
searching dependent graphs…