(extend, opts)
| 175 | } |
| 176 | |
| 177 | export function selectExtendedTypes(extend, opts) { |
| 178 | const results = {}; |
| 179 | Reflect.ownKeys(extend).forEach(t => { |
| 180 | if (!results[t]) { |
| 181 | results[t] = select({ ...opts, type: t, extractionOpts: extend[t] }); |
| 182 | } |
| 183 | }); |
| 184 | return results; |
| 185 | } |
| 186 | |
| 187 | function extractResult(opts) { |
| 188 | const { type, extractor, fallback = true } = opts; |