number2currency

1.0.2 • Public • Published

NPM

Number To currency or Words

Contains some util methods for converting numbers into words and currency type INR

Install

npm install number2currency

API

toWords(number)

Converts an integer into a string with words. If number is decimal, the decimals will be removed.

var converter = require('number2currency');
converter.toWords(21); // => “twenty one”

toWords(string)

Converts string into words. If number is decimal, the decimals will be removed.

var converter = require('number2currency');
converter.toWords('13'); // => “thirteen”

// Decimal numbers:
converter.toWords(2.9); // => “two”

// Large numbers:
converter.toWords(900712003); // => “ninety crore seven lakh twelve thousand three”

Change Log

1.0.0
  • Initial release

Package Sidebar

Install

npm i number2currency

Weekly Downloads

0

Version

1.0.2

License

ISC

Unpacked Size

3.37 kB

Total Files

3

Last publish

Collaborators

  • aarul.j