rupeesinword
v1.1.1
Published
A Node.js package to convert rupees and show in words with support for 9 indian regional languages.
Downloads
40
Maintainers
Readme
A Node.js package to convert rupees and show in words with support for 9 indian regional languages (Bangla, Hindi, Gujarati, Kannada, Marathi, Odia, Punjabi, Tamil, Telugu).
Installing
- Using npm:
$ npm i rupeesinword
- Using yarn:
$ yarn add rupeesinword
Usage
- Import the package
const rupeesInWord = require('rupeesinword');
- For English
const value = 1254.76;
const word = rupeesInWord(value);
console.log(word);
// One Thousand Two Hundred and Fifty-Four Rupees and Seventy-Six Paisa Only
- For Other Indian Regional Languages
Currently 9 regional languages are supported. Following is the list of supported regional languages.
Bangla, Hindi, Gujarati, Kannada, Marathi, Odia, Punjabi, Tamil, Telugu
const value = 1254.76;
const options = { lang: 'Bangla', outputCase: 'Title' };
const word = rupeesInWord(value, options);
console.log(word);
// এক হাজার দুই শত চুয়ান্ন টাকা ছিয়াত্তর পয়সা
const value = 1254.76;
const options = { lang: 'Hindi', outputCase: 'Title' };
const word = rupeesInWord(value, options);
console.log(word);
// एक हज़ार दो सौ और चौवन रुपये और छिहत्तर पैसे
Options
| Property | Type | Optional | Default | Accepted Values | | :--------- | :----- | :------- | :-------- | :--------------------------------------------------------------------------------------------------- | | lang | string | Yes | "English" | "English", "Bangla", "Hindi", "Gujarati", "Kannada", "Marathi", "Odia", "Punjabi", "Tamil", "Telugu" | | outputCase | string | Yes | "Title" | "Title", "Upper", "Lower" |
Issues
If you encounter any issue while using the package please report it here 👉 Soumya-Dey/rupeesinword/Issues