kFormatter = (num) => {
  return Math.abs(num) > 999
    ? Math.sign(num) * parseFloat((Math.abs(num) / 1000).toFixed(1)) + "k"
    : Math.sign(num) * Math.abs(num);
}
Retrieves num with suffix k(thousands) precise to 1 decimal if greater than 999.

@param {number} num The number to format.
@returns {string|number} The formatted number.