(total, throttled)
| 35 | }; |
| 36 | |
| 37 | export const progressEventDecorator = (total, throttled) => { |
| 38 | const lengthComputable = total != null; |
| 39 | |
| 40 | return [ |
| 41 | (loaded) => |
| 42 | throttled[0]({ |
| 43 | lengthComputable, |
| 44 | total, |
| 45 | loaded, |
| 46 | }), |
| 47 | throttled[1], |
| 48 | ]; |
| 49 | }; |
| 50 | |
| 51 | export const asyncDecorator = |
| 52 | (fn) => |