UNPKG

pubchem

Version:

pubchem simplifies the data retrieval from the PubChem API.

29 lines (26 loc) 1.07 kB
import type { Options } from '../../compound/Compound'; import type { DataType } from '../CompoundData'; import { getBoilingPoint } from './getBoilingPoint'; import { getDensity } from './getDensity'; import { getFlashPoint } from './getFlashPoint'; import { getMeltingPoint } from './getMeltingPoint'; import { getRefractiveIndex } from './getRefractiveIndex'; import { getSolubility } from './getSolubility'; import { getVaporPressure } from './getVaporPressure'; /** * Returns the experimental data of a compound * @param data Data of a compound data request to the PubChem API * @param options Options for the compound * @returns ExperimentalData */ export function getExperimentalData(data: DataType, options: Options) { return { boilingPoint: getBoilingPoint(data, options), density: getDensity(data, options), flashPoint: getFlashPoint(data, options), meltingPoint: getMeltingPoint(data, options), solubility: getSolubility(data), vaporPressure: getVaporPressure(data, options), refractiveIndex: getRefractiveIndex(data), }; }