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

number-into-words

v1.0.2

Published

A npm package to convert number into words

Downloads

27

Readme

Number Into Words

Build Status Build Status

number-into-words is a light-weight, quick number to words generator for NodeJS or other Front End Frameworks that uses JavaScript. It has ZERO dependency.

  • Generate Words from Numbers (Capital/lowercase/UPPERCASE Supported)
  • Two Major Numbering System Supported (Indian & International Number System)
  • Auto Punctuation inbuilt.
  • ZERO Dependencies.
  • Light Weight (9 kB as measured correctly).
  • Test Before Installing (Link is provided in Reference Section).

Installation

number-into-words requires Node.js v6+ or A browser Support upto ES6 alteast to run. Backward compatibility will be added in Upcoming Versions.

Create a directory and install the package.

$ mkdir number-into-words-folder
$ cd number-into-words-folder
$ npm install number-into-words

Reference:

| Repo | README | | ------ | ------ | | Github | https://github.com/amandeeptherockstar/number-into-words | | NPM Package | https://www.npmjs.com/package/number-into-words | | Test Online | https://numberintowords.netlify.com/ |

Load Module in Project

Load the Module:

const converter = require('number-into-words');

Methods

Module gives us two methods to use:

#1. indianConversion(number, {characterCase: value});

** number: int = Number which needs to be converted into Words Using Indian Numbering System. ** value: string = value can be the return case of words, Possible values are: capital, uppercase and lowercase. For more info On Indian Numbering System visit https://en.wikipedia.org/wiki/Indian_numbering_system

#2. internationalConversion(number, {characterCase: value});

** number: int = Number which needs to be converted into Words Using International Numbering System. ** value: string = value can be the return case of words, Possible values are: capital, uppercase and lowercase. For more info On International Numbering System visit https://www.math-only-math.com/international-numbering-system.html

Examples

/* indianConversion */
const words = converter.indianConversion(7664190, {characterCase: 'UPPERCASE'});
console.log(words);
// output - SEVENTY-SIX LAC, SIXTY-FOUR THOUSAND, ONE HUNDRED AND NINETY.

/* internationalConversion */
const words = converter.internationalConversion(100000001, {characterCase: 'lowercase'});
console.log(words);
// output - one hundred million and three.

Testing Online Before Installing

Visit the following URL to see the practical use of this package: https://numberintowords.netlify.com/

License

MIT

Free Package, Hell Yeah!