pruned

0.1.1 • Public • Published

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

Package Sidebar

Install

npm i pruned

Weekly Downloads

0

Version

0.1.1

License

MIT

Unpacked Size

3.19 kB

Total Files

4

Last publish

Collaborators

  • mayeedwin