0.1.1 • Published 7 months ago
bangla-utils v0.1.1
Bangla Utils
A comprehensive utility library for working with Bangla (Bengali) numbers, dates, math operations, and more.
Features
- Number Utilities: Convert English digits to Bengali digits, format numbers, and more.
- Date & Time Utilities: Work with Bengali dates, convert UTC timestamps to local Bengali time, and more.
- Math Utilities: Perform basic math operations with Bengali number support.
- General Utilities: Useful functions for working with Bengali text and data.
Installation
Install the library via npm:
npm install bangla-utils
Usage
Import and use the utilities in your project:
import {
welcome,
convertToBanglaDigits,
utcToLocalTimestamp,
} from 'bangla-utils';
console.log(welcome()); // Output: "স্বাগতম!"
console.log(convertToBanglaDigits(12345)); // Output: "১২৩৪৫"
console.log(convertToWords(123.45)); // Output: "একশত তেইশ দশমিক চার পাঁচ"
console.log(convertToTakaInWords(123.45)); // Output: "একশত তেইশ টাকা এবং পঁয়তাল্লিশ পয়সা"
console.log(convertToTakaInWords(123.45, false, true)); // "একশত তেইশ টাকা এবং পঁয়তাল্লিশ পয়সা মাত্র।"
console.log(convertToTakaInWords(123.45, true, true)); // "One hundred twenty-three taka and forty-five poisha only."
For detailed usage, refer to the documentation.
Documentation
Explore the full documentation to learn about all available utilities and their usage:
Contributing
We welcome contributions from the community! Whether you want to add new features, fix bugs, or improve documentation, your help is appreciated.
Learn how to contribute: Contributing Guide
License
This project is licensed under the MIT License. See the LICENSE file for details.
Support
If you find this library useful, consider giving it a ⭐️ on GitHub. For questions or feedback, please open an issue.