Skip to content

Converts Numbers (including decimal points) into words.

License

Notifications You must be signed in to change notification settings

paulpascal/to-words

 
 

Repository files navigation

Number to Words

Introduction

Converts Numbers (including decimal points) into words . It also converts the numbers into words for currency.

Installation

npm install with_decimal --save

OR

yarn add with_decimal

Usage

let toWords = require("with_decimal");
let words = toWords(123); // words = One Hundred Twenty Three

words = toWords(123.45); // words = One Hundred Twenty Three Point Fourty Five

To convert to currency

let toWords = require("with_decimal");
let words = toWords(452, { currency: true, label: "EUR" }); // words = Four Hundred Fifty Two EUR Only

words = toWords(452.36, { currency: true, label: "EUR" }); // words = Four Hundred Fifty Two EUR And Thirty Six Only

About

Converts Numbers (including decimal points) into words.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • JavaScript 99.1%
  • Shell 0.9%