sps-number-format

1.0.1 • Public • Published

@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

Readme

Keywords

Package Sidebar

Install

npm i sps-number-format

Weekly Downloads

1

Version

1.0.1

License

ISC

Unpacked Size

4.59 kB

Total Files

5

Last publish

Collaborators

  • sprakash1