Skip to content

hiTyagi/numericText

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

numericText

Converts Number to Short Textual value.

Examples :

  • 100000 -> 1.00 Lakh (Indian) or 100.00 Thousand (International)
  • 3453232 -> 34.53 Lakh (Indian) or 3.45 Million (International)

Options :

Option Default Possible values Description
type 'indian' 'indian', 'international' Type of texual currency.
shortHand true true, false Whether full currency text is required or short form.
minimum 2 Integer value greater than 2 Minimum number of digits after which number should be converted to text.
decimal 2 Integer value (>=0) Number of digits after decimal point.

Usage

  1. Add jQuery
  2. Add numericText
  3. Use jQuery selector to convert number to short text

e.g.

//html 231245.45 //js $("span#num").numericText();

or

//html
<input class="textCurr" value="234534.789"/>
//js
$(".textCurr").numericText({
  type:'international'
});

License

numericText is released under the MIT license.

About

Converts Number to Textual Value.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published