@basrioglu/numbertowords
TypeScript icon, indicating that this package has built-in type declarations

1.0.2 • Public • Published

React-js Next-js

A simple utility to convert numbers into their word representation in different languages. Perfect for applications where displaying numbers as words is required.

Features

  • Multi-Language Support: Easily convert numbers to words in multiple languages.
  • Handles Large Numbers: Converts numbers in the millions and billions with ease.
  • Customizable: Language data is stored in a YAML file, allowing for easy customization and addition of new languages.
  • Next Generation: Built with modern JavaScript features and performance optimizations, ensuring compatibility and efficiency for the future.
  • Hookless: No React or other framework-specific hooks required, making it versatile and easy to integrate into any project.
  • Frameworkless/Libraryless: Does not depend on any specific framework or library, ensuring it can be used in a variety of environments, from Node.js to browser-based applications.

Installation

NPM alt text

YARN alt text

Getting Started

Here's a quick guide on how to use the NumberToWord Converter in your project.

Import the Function

First, import the convertNumberToWord function and LONG_TERM_SUPPORTED_LANGUAGE

alt text

Convert a Number to Words

Use the convertNumberToWord function to convert a number into words in your desired language:

alt text

Handling Errors

The convertNumberToWord function handles common errors, such as unsupported languages or negative numbers, by returning undefined and logging a message to the console.

Contributing

Contributions are welcome! Please feel free to submit a pull request or open an issue if you find a bug or have a feature request.

Contact

Feel free to reach out for any questions or suggestions!

alt text

Readme

Keywords

none

Package Sidebar

Install

npm i @basrioglu/numbertowords

Weekly Downloads

1

Version

1.0.2

License

ISC

Unpacked Size

21.9 kB

Total Files

8

Last publish

Collaborators

  • basrioglumehmet