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

multilingual-number-to-words

v6.0.1

Published

Converts to number in to words. one can get words written in any language. users can add there own language if not included

Downloads

321

Readme

multilingual-number-to-words

verson License

This converts to numbers to words. one can get words written in any language. users can add there own language if not included. It also gives numbers in comma separated fashion. one can get results for both lakhs-crore and also in million-billion format

Decimal can be diplayed in currency style or scientfic or mathmetical style

As of now Version 3.0.0 following languages are included in this project

  1. english (default)
  2. kananda
  3. hindi
  4. telagu
  5. marathi
To add languages to this module kindly read below

How to use

use this command to include as a node module

npm i multilingual-number-to-words

Features

  1. Decimal value truncated to two degits
Note maximum number for crore and lakh conversion is 999999998
Note maximum number for million and billion conversions is 999999999999998
const {NumberToWord, kananda, english, telagu, marathi}= require("multilingual-number-to-words")

let n = new NumberToWord(english);

console.log(n.getWord( 123456789111.04,"MillionAndBillion", "Currency"));
console.log(n.convertToComaSeparetedString(123456789111, "MillionAndBillion"));
console.log(n.convertToComaSeparetedString(123456789111 ));

Use your own language in as JSON

console.log("\n\n\nFrench")
let french = {
"single_digits" : ["zéro", "un", "deux", "trois", "quatre", "cinq", "six", "sept", "huit", "neuf"],
"teens" : ["dix", "onze", "douze", "treize", "quatorze", "quinze", "seize", "dix-sept", "dix-huit", "dix-neuf"],
"double_digits" : ["zéro", "dix", "vingt", "trente", "quarante", "cinquante", "soixante", "soixante-dix", "quatre-vingts", "quatre-vingt-dix" ],
"crore_lakhs" : ["cent", "mille", "lakh", "crore"],
"million_billions" : ["cent", "mille", "million", "billion", "billion", "quadrillion"],
"and_currency" : ["et", "roupies", "paise", "point"]
}

// add your new language to your project
let n = new NumberToWord(french);

Below is the english version use for trasalating in to your language

Only trasalate array elements.

{   
        "single_digits": ["zero", "one", "two", "three", "four", "five", "six", "seven", "eight", "nine"],
        "teens": ["ten", "eleven", "twelve", "thirteen", "fourteen", "fifteen", "sixteen", "seventeen", "eighteen", "nineteen"],
       "double_digits": ["zero", "ten", "twenty", "thirty", "forty", "fifty", "sixty", "seventy", "eighty", "ninety"],
        "crore_lakhs": ["hundred", "thousand", "lakh", "crore"],
        "million_billions": [ "hundred", "thousand","million","billion","trillion","quadrillion"],
        "and_currency": ["and","rupees", "paise", "point"]
    }