pubchem
Version:
pubchem simplifies the data retrieval from the PubChem API.
17 lines • 654 B
JavaScript
import merge from 'deepmerge';
import { parseVaporPressure } from 'physical-parser';
import { extractExperimentalData } from './extractExperimentalData';
/**
* Returns the vapor pressure of a compound
* @param data Data of a compound data request to the PubChem API
* @param options Options for the compound
*/
export function getVaporPressure(data, options = {}) {
const vaporPressure = extractExperimentalData(data, 'Vapor Pressure', {
parser: (value) => parseVaporPressure(value, merge({
temperature: { optional: true },
}, options)),
});
return vaporPressure;
}
//# sourceMappingURL=getVaporPressure.js.map