with_decimal
v4.2.1
Published
.
Downloads
261
Readme
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