Getting the reputation value on Steemit

Words
8
Reading
1 min
Listen
Play
9y

View on SteemBin



function getRepValue(rep,intRes=true){

var res = Math.log10(rep);

if (isNaN(res))
    res = 0;

res = Math.max(res - 9,0);

res = (res < 0 ? -1 : 1) * res;

res = (res * 9) + 25;

if (intRes)
  res = parseInt(res);
else
 res = parseFloat((res).toFixed(2));

return res;

}

View on SteemBin

Getting the reputation value on Steemit | Ecency