chemicaltools-js
Chemical Tools for JavaScript.
Dependencies
Installion
Install with npm
npm i chemicaltools
And you can use in Node.js:
chemicaltools = require('../index')
Use in a web page
Add script:
<script src="https://cdn.jsdelivr.net/npm/chemicaltools@latest/bundle.js"></script>
Usage
console.log(JSON.stringify(chemicaltools.searchElement("Hf")));
console.log(JSON.stringify(chemicaltools.calculateMass("C6H12O6")));
console.log(JSON.stringify(chemicaltools.calculateGas(p = 3, V = 1, n = 1)));
console.log(JSON.stringify(chemicaltools.calculateAcid(0.1, [2, 7], true)));
console.log(JSON.stringify(chemicaltools.calculateDeviation([2.232, 2.455, 2.742, 2.535, 2.362])));
console.log(JSON.stringify(chemicaltools.makeQuestion("name", "iupac")));
console.log(JSON.stringify(chemicaltools.correctAnswer("铷", "Rubidiutm", "name", "iupac")));