npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

num2talk

v1.1.8

Published

Convert numbers to text in multiple languages including English, Bengali, Hindi, Arabic, and more.

Downloads

548

Readme

Bridging Languages Through Number Translation – Supporting 10 Popular Languages.

num2talk Documentation

num2talk is a JavaScript package that provides functions to convert numbers into words in various languages, including English, Bengali, Hindi, Arabic, Chinese, Urdu, Portuguese, Russian, Japanese, and Spanish.

Installation

You can install num2talk via npm:

npm install num2talk

Usage

After installation, you can import the specific number-to-word functions you need in your project.

import { num2Word, num2Bangla, num2Hi } from 'num2talk';

// Example usage
console.log(num2Word(123));       // Converts to English words: "one hundred twenty-three"
console.log(num2Bangla(456));     // Converts to Bengali words: "চারশ পঁচাশি"
console.log(num2Hi(789));         // Converts to Hindi words: "सात सौ नवासी"

Language Functions Table

The following table outlines the available languages, their respective functions, and usage examples.

| Language | Function | Usage Example | Output | |------------|-----------------|------------------------------------------|----------------------------------| | English | num2English | num2English(12345) | "twelve thousand three hundred forty-five" | | English | num2Words | num2Words(12345) | "twelve thousand three hundred forty-five"| | Bengali | num2Bangla | num2Bangla(678) | "ছয়শ আটাত্তর" | | Hindi | num2Hindi | num2Hindi(101) | "एक सौ एक" | | Arabic | num2Arabic | num2Arabic(345) | "ثلاثمائة وخمسة وأربعون" | | Chinese | num2Chinese | num2Chinese(5678) | "五千六百七十八" | | Urdu | num2Urdu | num2Urdu(901) | "نو سو ایک" | | Portuguese | num2Portuguese | num2Portuguese(2345) | "dois mil trezentos e quarenta e cinco" | | Russian | num2Russian | num2Russian(890) | "восемьсот девяносто" | | Japanese | num2Japanese | num2Japanese(1234) | "千二百三十四" | | Spanish | num2Spanish | num2Spanish(567) | "quinientos sesenta y siete" |

Example Usage

Here’s how to use some of the functions:

Using num2English

The num2English function takes a number as input and returns the corresponding English word.

import {num2Arabic, num2Bangla, num2Chinese, num2English, num2Hindi,num2Japanese, num2Portuguese, num2Russian, num2Spanish,num2Urdu} from 'num2talk'

const App = () => {
    const number = 12345

    console.log(num2English(number))
    console.log(num2Hindi(number))
    console.log(num2Japanese(number))
    console.log(num2Portuguese(number))
    console.log(num2Russian(number))
    console.log(num2Spanish(number))
    console.log(num2Urdu(number))
    console.log(num2Arabic(number))
    console.log(num2Bangla(number))
    console.log(num2Chinese(number))
  return (
    <div>App</div>
  )
}

export default App

Contributing

If you wish to contribute to the development of num2talk, feel free to fork the repository and submit pull requests. Ensure you follow the coding conventions and include tests for any new features you add.

License

This project is licensed under the MIT License - see the LICENSE file for details.

Acknowledgements

  • Thank you to all contributors and users for your support in improving this package.

Additional Sections (if needed)

  • Changelog: Document any updates, fixes, or improvements made to the package over time.
  • FAQ: Address common questions or issues users might encounter.
  • Contributing: Provide instructions for how to contribute to the project.
  • Credits: List any third-party libraries or resources used in the package.
  • License: Include a copy of the license used for the package.