The number to convert to words
Configuration options
Use hyphens in compound numbers like "twenty-one" (default: false)
Include "and" (British style: "one hundred and five") (default: false)
Separator between words (default: " ")
The number spelled out in words
toWords(42) // "forty two"
toWords(42, {hyphens: true}) // "forty-two"
toWords(105, {and: true}) // "one hundred and five"
toWords(1234) // "one thousand two hundred thirty four"
toWords(1000000) // "one million"
toWords(0) // "zero"
toWords(3.14) // "three point one four"
toWords(0.5) // "zero point five"
Converts a number to its written word representation.