JSPM

num2words

1.0.2
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 129
  • Score
    100M100P100Q80657F
  • License MIT

number-to-words conversion upto length 16.

Package Exports

  • num2words

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (num2words) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

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