/rupeesinword

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).

Primary LanguageJavaScriptMIT LicenseMIT


₹upees in Word

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).

license npm latest package npm downloads github stars minified size last commit closed issues open issues

Installing

  • Using npm:
$ npm i rupeesinword
  • Using yarn:
$ yarn add rupeesinword

Usage

  1. Import the package
const rupeesInWord = require('rupeesinword');
  1. 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
  1. 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

License

MIT License