Skip to content

Converts Numbers (including decimal points) into words for Indian style.

License

Notifications You must be signed in to change notification settings

MusarrathS/to-words

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Number to Words

Introduction

Converts Numbers (including decimal points) into words for Indian style. It also converts the numbers into words for currency, again, for Indian style.

Installation

npm install to-words --save

OR

yarn add to-words

Usage

let toWords = require('to-words');
let words = toWords(123); // words = One Hundred Twenty Three

words = toWords(123.45); // words = One Hundred Twenty Three Point Fourty Five

To convert to currency

let toWords = require('to-words');
let words = toWords(452, {currency: true}); // words = Four Hundred Fifty Two Rupee Only

words = toWords(452.36, {currency: true}); // words = Four Hundred Fifty Two Rupee And Thirty Six Paise Only

Inspiration

https://stackoverflow.com/a/46221860

About

Converts Numbers (including decimal points) into words for Indian style.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 100.0%