The parsed JSON response body
Up to five distinct solubility statements, or undefined when none exist
export function extractSolubility(data: unknown): string[] | undefined {
const lines = new Set<string>();
for (const entry of collectInformation(data)) {
for (const { text } of markupItems(entry)) {
const trimmed = text.trim();
if (trimmed !== '') lines.add(trimmed);
}
}
return lines.size > 0 ? [...lines].slice(0, 5) : undefined;
}
Parses a PUG-View
Solubilityresponse into de-duplicated plain-text statements.