Skip to content

LachlanDev/easy-number-formatter

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

easy-number-formatter

version downloads downloads
Simple Number format script (Convert 1000 - 1K)

About

Using this NPM package you will be able to convert large numbers to a simple text format,

  • 1000 - 1K
  • 1,000,000 - 1M
  • 1,000,000,000 - 1B
  • 1,000,000,000,000 - 1T

Installation

npm i easy-number-formatter

Usage

const number = require('easy-number-formatter')

var newNum = number.formatNumber(1000)

console.log(newNum)