({ onError, onResult, resultReturns, onDone })
| 9 | |
| 10 | class AsyncSeriesBailHookCodeFactory extends HookCodeFactory { |
| 11 | content({ onError, onResult, resultReturns, onDone }) { |
| 12 | return this.callTapsSeries({ |
| 13 | onError: (i, err, next, doneBreak) => onError(err) + doneBreak(true), |
| 14 | onResult: (i, result, next) => |
| 15 | `if(${result} !== undefined) {\n${onResult( |
| 16 | result |
| 17 | )}\n} else {\n${next()}}\n`, |
| 18 | resultReturns, |
| 19 | onDone |
| 20 | }); |
| 21 | } |
| 22 | } |
| 23 | |
| 24 | const factory = new AsyncSeriesBailHookCodeFactory(); |
nothing calls this directly
no test coverage detected