1.0.1 • Published 7 years ago

sps-number-format v1.0.1

Weekly downloads
2
License
ISC
Repository
github
Last release
7 years ago

@sprakash/number-format

#number for-matter and create shortcut number description like 1000 to 1K

A small library that adds commas to numbers

Installation

npm install @sprakash1/number-format

Usage

var numFormatter = require('@sprakash1/number-format');

var formattedNum = numFormatter(1000);

Output should be 1K

var formattedNum = numFormatter(12600);

Similler Output should be 4===>4 40===>40 400===>400 4000===>4K 8767===>8.76K 87449===>87.44K 989485===>989.48K 12347659===>12.34M 4224424421===>4.22B 103984447575===>103.98B

Tests

npm test

1.0.1

7 years ago

1.0.0

7 years ago