Flattens an Elasticsearch response's hits.hits array into a plain array of source items.
Ported from luv-autoq-frontend, where the same hits?.hits?.map((hit) => hit.source) unwrap
was duplicated across several stores/composables with slightly different styles (?? [] vs
|| [], with/without optional chaining) - ama-deep and data-sheet-portal have the
byte-identical response shape and the same duplicated unwrap, just with only one call site
each so far.
Flattens an Elasticsearch response's
hits.hitsarray into a plain array ofsourceitems.Ported from
luv-autoq-frontend, where the samehits?.hits?.map((hit) => hit.source)unwrap was duplicated across several stores/composables with slightly different styles (?? []vs|| [], with/without optional chaining) -ama-deepanddata-sheet-portalhave the byte-identical response shape and the same duplicated unwrap, just with only one call site each so far.