https://github.com/mayeedwin/pruned
Prune Number Counters
https://github.com/mayeedwin/pruned
counters mayeedwin npm npm-install numbers prune
Last synced: 5 months ago
JSON representation
Prune Number Counters
- Host: GitHub
- URL: https://github.com/mayeedwin/pruned
- Owner: mayeedwin
- License: mit
- Created: 2020-04-20T19:35:57.000Z (about 6 years ago)
- Default Branch: master
- Last Pushed: 2020-04-22T21:58:07.000Z (about 6 years ago)
- Last Synced: 2025-09-09T01:43:55.212Z (9 months ago)
- Topics: counters, mayeedwin, npm, npm-install, numbers, prune
- Language: JavaScript
- Homepage: https://www.npmjs.com/package/pruned
- Size: 3.91 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
## Prune Number Counters
Basically, prune a.k.a abbreviate number counters for example **1,250,000** to **1.3M**
### Install Pruned
```bash
npm i pruned
```
### Import pruned in your react app
```js
import pruned from 'pruned';
```
### Require the pruned package
```js
const pruned = require('pruned');
```
### Pass in the number value
```js
let newRating = pruned.Number(value);
```
### Examples...
```js
let value = 5300;
let likes = pruned.Number(value); // Output : 5.3K
```