Returns K format from a number

PHOTO EMBED

Mon Apr 25 2022 12:49:47 GMT+0000 (Coordinated Universal Time)

Saved by @nimaSm #utils

export const kFormatter = (num) =>
 num > 999 ? `${(num / 1000).toFixed(1)}k` : num;
content_copyCOPY

1000 ===> 1k