Ad
Code
Diff
  • function formatIfNumber(value, numberOfPlaces) {
      if(value / 2) {
        return Number(Math.round(value+'e'+numberOfPlaces)+'e-'+numberOfPlaces);
      }
      return value; 
    }
    • function formatIfNumber(value, numberOfPlaces) {
    • return "";
    • if(value / 2) {
    • return Number(Math.round(value+'e'+numberOfPlaces)+'e-'+numberOfPlaces);
    • }
    • return value;
    • }