Abbreviation libary is used to abbreviate long numbers to string 1000 => 1k
npm i @jalato/abbreviate
yarn add @jalato/abbreviate
import abbreviate from "@jalato/abbreviate";
// 1.23M
abbreviate(1234567,false,2)
import abbreviate from "@jalato/abbreviate";
// takes 3 arguments abbreviate(number,maxPlace,forPlace,forceLetter)
/*
{
number:Number,
maxPlace:number | Boolean,
forcePlace:number | Boolean,
forceLetter:number | Boolean
}
*/
abbreviate(number,Boolean,Boolean,Boolean)
import { byteConversion } from "@jalato/abbreviate";
const Data = byteConversion(1580)
console.log(Data)
// 1.58 KB