A lightweight JavaScript library to convert English numbers to Bengali words (বাংলা). Supports integers, decimals, and negative numbers.
- 🔢 Convert integers to Bengali words
- 💯 Support for large numbers (up to quadrillion)
- 🎯 Decimal number conversion
- ➖ Negative number support
- 🪶 Lightweight with zero dependencies
- 📦 Easy to integrate
npm install number-to-bengli-wordsconst numberToBengliWords = require("number-to-bengli-words");
// Convert integer
console.log(numberToBengliWords.toBengaliWords(571));
// Output: পাঁচশত একাত্তর
// Convert decimal
console.log(numberToBengliWords.toBengaliWords(3.14));
// Output: তিন দশমিক এক চার
// Convert negative number
console.log(numberToBengliWords.toBengaliWords(-100));
// Output: ঋণাত্মক একশত
// Convert zero
console.log(numberToBengliWords.toBengaliWords(0));
// Output: শূন্য| Number | Bengali Words |
|---|---|
0 |
শূন্য |
571 |
পাঁচশত একাত্তর |
1000 |
এক হাজার |
100000 |
এক লাখ |
10000000 |
এক কোটি |
3.14 |
তিন দশমিক এক চার |
-50 |
ঋণাত্মক পঞ্চাশ |
- Node.js (version 12 or higher)
git clone https://github.com/maruf571/number-to-bengali-words.git
cd number-to-bengali-words
npm installnpm testConverts a number to its Bengali word representation.
Parameters:
number(Number): The number to convert (integer or decimal)
Returns:
string: Bengali word representation of the number
Example:
numberToBengliWords.toBengaliWords(123);
// Returns: একশত তেইশContributions, issues, and feature requests are welcome! Feel free to check the issues page.
Mahmudul Hassan
- GitHub: @maruf571
- Email: [email protected]
This project is licensed under the ISC License - see the LICENSE file for details.
Give a ⭐️ if this project helped you!