1.0.2 • Published 5 years ago

num2words v1.0.2

Weekly downloads
3
License
MIT
Repository
github
Last release
5 years ago

numtowords.js logo

num2words.js

num2words.js is a lightweight ~1kb javascript library for working with numeral values. It was built to convert number to words in javascript.

Installation

With npm:

npm install --save num2words.js

Usage

Number to words will accept numbers, strings as values.

numToWords(12121212); // One hundred Twenty-One Thousand Two hundred Twelve


numToWords(999999999999999999999999999999999);  //nine hundred ninety-nine nonillion nine hundred ninety-nine octillion nine hundred ninety-nine septillion nine hundred ninety-nine sextillion nine hundred ninety-nine quintillion nine hundred ninety-nine quadrillion nine hundred ninety-nine trillion nine hundred ninety-nine billion nine hundred ninety-nine million nine hundred ninety-nine thousand nine hundred ninety-nine