Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

pruned

mayeedwin265MIT0.1.1

Abreviate Number Counters in K, B, M, T for a Thousand, Million, Billion and Trillion short-hand

prune, pruned, million, billion, trillion, abrreviate, thousand in K, million in M, trillion in T, counters, maye edwin

readme

Prune Number Counters

Basically, prune a.k.a abbreviate number counters for example 1,250,000 to 1.3M

Install Pruned

npm i pruned

Import pruned in your react app

import pruned from 'pruned';

Require the pruned package

const pruned = require('pruned');

Pass in the number value

let newRating = pruned.Number(value);

Examples...

let value = 5300;
let likes = pruned.Number(value); // Output : 5.3K