1.3.0 • Published 2 months ago
pubchem v1.3.0
PubChem
Simplify the retrieval of information from PubChem using the PubChem JSON API.
Installation
$ npm i pubchem
Usage
import { Compound } from 'pubchem';
async function doAll() {
const compound = await Compound.fromSmiles('CCCCCBr', { cache });
console.log(compound.getCID());
const compoundData = await compound.getData();
const ghs = compoundData.ghs;
console.log(ghs);
const detailedGHS = compoundData.getGHS();
console.log(detailedGHS);
const computed = compoundData.computed;
console.log(computed);
const experimentalData = compoundData.getExperimentalData({
pressure: { targetUnits: 'torr' },
temperature: { targetUnits: '°C' },
});
console.log(experimentalData);
}
doAll();
You can run a working example using:
node test/simple.js
CDN
Online demo
API Documentation
License
1.2.0
2 months ago
1.3.0
2 months ago
1.1.0
1 year ago
1.0.0
1 year ago
0.10.1
1 year ago
0.9.3
2 years ago
0.10.0
1 year ago
0.9.2
2 years ago
0.9.1
2 years ago
0.9.0
3 years ago
0.8.0
3 years ago
0.7.0
3 years ago
0.6.0
3 years ago
0.5.0
3 years ago
0.4.1
3 years ago
0.4.0
3 years ago
0.3.2
3 years ago
0.3.1
3 years ago
0.3.0
3 years ago
0.2.0
3 years ago
0.1.0
3 years ago
0.0.3
3 years ago
0.0.2
3 years ago
0.0.1
3 years ago