amount-in-words
TypeScript icon, indicating that this package has built-in type declarations

1.0.1 • Public • Published

amount-in-words

Convert numeric amount in words

A very simple tool to convert amount in words.

Conversion Examples
101 - One Hundred One Rupees
1010101010.01 - One Billion Ten Million One Hundred One Thousand Ten Dollars And One Cent

Input Parameters

amount: number or string (e.g. 11022.27, '$657,798.54')
countryCode: IND, GBR, USA (more will be added in future)

Usage - Javascript

const atwp = require('amount-in-words');
const atw = new atwp.AmountToWords();

console.log(atw.toWords(111.11, atwp.CountryCodes.IND));

Usage - Typescript

import { AmountToWords, CountryCodes } from "amount-in-words";
const atw = new AmountToWords();

console.log(atw.toWords(123.45, CountryCodes.GBR));

Package Sidebar

Install

npm i amount-in-words

Weekly Downloads

54

Version

1.0.1

License

MIT

Unpacked Size

17.5 kB

Total Files

9

Last publish

Collaborators

  • cod-e-ash