gasStats.js
function gasToCost (gas, ethPrice, gasPrice) {
  ethPrice = parseFloat(ethPrice)
  gasPrice = parseInt(gasPrice)
  return ((gasPrice / 1e9) * gas * ethPrice).toFixed(2)
}
function gasToCost (gas, ethPrice, gasPrice) {
  ethPrice = parseFloat(ethPrice)
  gasPrice = parseInt(gasPrice)
  return ((gasPrice / 1e9) * gas * ethPrice).toFixed(2)
}
function gasToCost ( gas , ethPrice , gasPrice ) { ethPrice = parseFloat ( ethPrice ) gasPrice = parseInt ( gasPrice ) return ( ( gasPrice / 1e9 ) * gas * ethPrice ) . toFixed ( 2 ) }
Expresses gas usage as a nation-state currency price
@param  {Number} gas      gas used
@param  {Number} ethPrice e.g chf/eth
@param  {Number} gasPrice in wei e.g 5000000000 (5 gwei)
@return {Number}          cost of gas used (0.00)
Expresses gas usage as a nation - state currency price