* @param {IfCallback} cb
(cb, state)
| 115 | * @param {IfCallback} cb |
| 116 | */ |
| 117 | async if(cb, state) { |
| 118 | // For now only support ANDs |
| 119 | let success = true; |
| 120 | for (const condition of cb.condition) { |
| 121 | const r = evaluateCondition(condition, state); |
| 122 | if (!r) { |
| 123 | success = false; |
| 124 | break; |
| 125 | } |
| 126 | } |
| 127 | |
| 128 | for (const m of cb[success + ""] ?? []) { |
| 129 | await invokeCallback(m, state); |
| 130 | } |
| 131 | }, |
| 132 | /** |
| 133 | * @param {FetchCallback} cb |
| 134 | */ |
nothing calls this directly
no test coverage detected