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

digit_exchange

v6.0.0

Published

A Easy To Use JS Library To Convert Your Amount Digits To Text In Indian Currency Units. For Example 987654321 Gives Nintey Eight Crore Seventy Six Lacs Fifty Four Thousand Three Hundred Tewnty One

Downloads

41

Readme

digit_exchange

A Easy To Use JS Library To Convert Your Amount Digits To Text In Indian Currency Units. For Example 987654321 Gives Ninety Eight Crore Seventy Six Lakh Fifty Four Thousand Three Hundred Twenty One.

Installation

This is a Node.js module available through the npm registry.

$ npm install digit_exchange

Include digit_exchange To Your Project

const digitExchange = require('digit_exchange');

Digit To Amount String


// Wants Only Convert Digit Amount To String 
var digitAmount = 987654321;

var stringAmount = digitExchange.getAmountString(digitAmount);

console.log(stringAmount);
// output : Ninety Crore Seventy Six Lakh Fifty Four Thousand Three Hundred Twenty One

// Wants To Add Your Own String Before Or After Converted Amount  
var digitAmount = 987654321;

var stringAmount = digitExchange.getAmountString(digitAmount,{prefix:"Rupees",suffix:"Only /-"});

console.log(stringAmount);
// output : Rupees Ninety Crore Seventy Six Lakh Fifty Four Thousand Three Hundred Twenty One Only /-

Digit To Ordinary Numbers String


// Wants To Convert Digits To Ordinary Numbers
var digits = 987654321;

var digitString = digitExchange.getNumberString(digits);

console.log(digitString);
// output : Nine Eight Seven Six Five Four Three Two One

// Wants To Add Your Own String After Or Before Converted Digits To Ordinary String Numbers
var digits = 987654321;

var digitString = digitExchange.getNumberString(digits,{prefix:"Mobile :"});

console.log(digitString);
// output : Mobile: Nine Eight Seven Six Five Four Three Two One

Seprators In Amount

// Wants To Add Seprator In Your Amount.By Default It Seprates Amount According To Indian Currency Units
var amount = 987654321;

var sepratedAmount = digitExchange.getSepratedAmount(amount);

console.log(digitString);
// output : 98,76,54,321

// Wants To Add Seprator In Your Amount According To Western Currency Units i.e USD
var amount = 987654321;

var sepratedAmount = digitExchange.getSepratedAmount(amount,{unit:"USD",prefix:"$",suffix:"Only /-"});

console.log(digitString);
// output : $ 987,654,321 Only /-

Ordinal Number

// Want Ordinal Number
var number = 23;

var ordinalNumber = digitExchange.getOrdinalNumber(number);

console.log(ordinalNumber);
// output : 23rd

// Want Ordinal Number With Own Text
var number = 23;

var ordinalNumber = digitExchange.getOrdinalNumber(number,{prefix:"Date",suffix:"June" });

console.log(ordinalNumber);
// output : Date 23rd June

Note To Use Currency Conversion

  • Float Amount Will Converted In Integers
  • Negative Amount Results In General String i.e -123 to One Hundred Twenty Three
  • Amount Upto 13 Digits Converted To String
  • Coversion Process Uses Only Indian Currency Units

Note To Use Ordinary Conversion

  • Float Number Will Converted In Integers
  • Negative Numbers Results In General String i.e -123 to One Two Three
  • Number Upto 15 Digits Converted To String
  • Digit More Than 15 Must Be In String Format i.e "123546454436463463463468"

Features

  • Fast Conversion
  • Huge Conversion Range i.e Upto 99 Kharab Or 13 Digits
  • Indian Currency Units
  • No Other Dependencies Required
  • Ordinary Numbers Can Converted Of Infinte Range

Change Log

Version 6.0.0

  • Ordinal Number Support
  • Seprators Support Indian And Western
Version 5.1.1
  • Ordinary Numbers Conversion Support !!!
Version 4.1.1
  • Amount Limit Expended To 13 Digits
Version 3.1.1
  • Float Amount Handling
Version 3.0.0
  • Bug Fixed BasicConversion
Version 2.0.1
  • String Amount Handling
Version 2.0.0
  • Negative Amount Handling
Version 1.0.2
  • Formatting Fixed
Version 1.0.1
  • Minor package tweaks
Version 1.0.0
  • Initial release

Indian Currency Units

Author

Pawan Kumar Bishnoi

Contributor

Suggestions And Issues

Email : [email protected]