* @param {array} arr an "accumulation" of items which is either an Array or * a single item. Useful when paired with the `accumulate` module. This is a * simple utility that allows us to reason about a collection of items, but * handling the case when there is exactly one item (and we do not need
(arr, cb, scope)
| 2263 | * @param {?} [scope] Scope used as `this` in a callback. |
| 2264 | */ |
| 2265 | function forEachAccumulated(arr, cb, scope) { |
| 2266 | if (Array.isArray(arr)) { |
| 2267 | arr.forEach(cb, scope); |
| 2268 | } else if (arr) { |
| 2269 | cb.call(scope, arr); |
| 2270 | } |
| 2271 | } |
| 2272 | |
| 2273 | /** |
| 2274 | * Internal queue of events that have accumulated their dispatches and are |
no outgoing calls
no test coverage detected