Used for converting temperature, volume, and mass.
nucos.convert(unitType, fromUnit, toUnit, value)
Example:
nucos.convert("Density", "API degree", "kg/m^3", 10)
Instantiate the OilQuantityConverter off of nucos
var oilConverter = new nucos.OilQuantityConverter();
Use the Convert method off of the OilQuantityConverter class
oilConverter.Convert(fromAmount, fromUnit, Density, DensityUnits, toUnit);
Example with inputs:
oilConverter.Convert(50, "tons", 10, "API degree", "cubic meters");
nucos is written in javascript, and packages as an NPM package.
Tests are using the mocha test framework: https://mochajs.org/
npm i --global mocha
Installing it globally makes the mocha command available on the command line.
mocha tests/
The test are in the tests/test.js file
See the mocha docs for how to update/write new tests.