code: function numberToString (x) { // avoids scientific notation for too large and too small numbers
  
      if (isString (x)) return x
  
      if (Math.abs (x) < 1.0) {
          const s = x.toString ()
          const e = parseInt (s.split ('e-')[1])
          const neg = (s[0] === '-')
          if (e) {
              x *= Math.pow (10, e-1)
              x = (neg ? '-' : '') + '0.' + (new Array (e)).join ('0') + x.toString ().substring (neg ? 3 : 2)
          }
      } else {
          let e = parseInt (x.toString ().split ('+')[1])
          if (e > 20) {
              e -= 20
              x /= Math.pow (10, e)
              x += (new Array (e+1)).join ('0')
          }
      }
      return x.toString ()
  }
docs: /*  ------------------------------------------------------------------------ See https://stackoverflow.com/questions/1685680/how-to-avoid-scientific-notation-for-large-numbers-in-javascript for discussion