function n(t, i = 1) {
  i = Math.pow(10, i);
  const r = ["K", "M", "B", "T"];
  let h = "";
  for (let o = r.length - 1; o >= 0; o--) {
    const f = Math.pow(10, (o + 1) * 3);
    if (f <= t)
      return t = Math.round(t * i / f) / i, t == 1e3 && o < r.length - 1 && (t = 1, o++), h = t + r[o], h;
  }
  return h += t, h;
}
export {
  n as abbreviateNumber
};
