🧮 I Built a Library to Convert Numbers into Words in 3 Languages
Have you ever needed a “terbilang” function in your project? When I worked on billing and invoice systems, I realized that most libraries only support English — none for Indonesian or Malay. So I decided to create number-to-words-id.
It’s a lightweight Node.js library that converts numbers into words in Indonesian, Malay, and English — all offline, no dependencies.
🚀 Quick Example
import { toWords } from "number-to-words-id";
console.log(toWords(75000));
// "tujuh puluh lima ribu"
console.log(toWords(75000, { lang: "en" }));
// "seventy-five thousand"
console.log(toWords(75000, { lang: "ms" }));
// "tujuh puluh lima ribu"
–…
🧮 I Built a Library to Convert Numbers into Words in 3 Languages
Have you ever needed a “terbilang” function in your project? When I worked on billing and invoice systems, I realized that most libraries only support English — none for Indonesian or Malay. So I decided to create number-to-words-id.
It’s a lightweight Node.js library that converts numbers into words in Indonesian, Malay, and English — all offline, no dependencies.
🚀 Quick Example
import { toWords } from "number-to-words-id";
console.log(toWords(75000));
// "tujuh puluh lima ribu"
console.log(toWords(75000, { lang: "en" }));
// "seventy-five thousand"
console.log(toWords(75000, { lang: "ms" }));
// "tujuh puluh lima ribu"
⚙️ Features
- 🇮🇩 Indonesian, 🇲🇾 Malay, 🇬🇧 English
- Currency and ordinal support
- Clean, dependency-free JavaScript
- Tiny size and fast performance
💡 Why I Built It
Because every time I saw terbilang(12345)
in projects, it was always a custom function someone copied from StackOverflow 😅
Now, we have a proper open-source version — tested, maintained, and versioned on npm.
🌍 Links
- 📦 npm: number-to-words-id
- 💻 GitHub: github.com/ibnushahraa/number-to-words-id
If you find it useful, please give it a ⭐ on GitHub — it’ll help more developers discover it! I’d also love to hear feedback or feature ideas.
Tags: #nodejs #javascript #npm #opensource #indonesia