()
| 141 | let pending = 0; |
| 142 | let cleanup = noop; |
| 143 | const sync = () => { |
| 144 | if (pending) { |
| 145 | return; |
| 146 | } |
| 147 | cleanup(); |
| 148 | const result = fn(single ? values[0] : values, set, update); |
| 149 | if (auto) { |
| 150 | set(result); |
| 151 | } else { |
| 152 | cleanup = typeof result === 'function' ? result : noop; |
| 153 | } |
| 154 | }; |
| 155 | const unsubscribers = stores_array.map((store, i) => |
| 156 | subscribe_to_store( |
| 157 | store, |