Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/carmonw/elm-number-to-words
Utility functions for converting numbers to its written form
https://github.com/carmonw/elm-number-to-words
elm numbers numbers-to-words
Last synced: about 2 months ago
JSON representation
Utility functions for converting numbers to its written form
- Host: GitHub
- URL: https://github.com/carmonw/elm-number-to-words
- Owner: carmonw
- License: bsd-3-clause
- Created: 2020-03-01T04:38:42.000Z (almost 5 years ago)
- Default Branch: master
- Last Pushed: 2024-08-26T15:19:01.000Z (5 months ago)
- Last Synced: 2024-10-15T22:16:02.125Z (3 months ago)
- Topics: elm, numbers, numbers-to-words
- Language: Elm
- Homepage: https://package.elm-lang.org/packages/carmonw/elm-number-to-words/latest/
- Size: 118 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# elm-number-to-words
This package provides utility functions for converting numbers to their written form.
## Installation
```
elm install carmonw/elm-number-to-words
```## Usage
### Converting An Int To Its Written Form
```elm
import NumberToWordsNumberToWords.intToWords 1255 == "one thousand, two hundred fifty-five"
```### Converting A Float To Its Written Form
```elm
import NumberToWordsNumberToWords.roundToWords 1232551.50 == "one million, two hundred thirty-two thousand, five hundred fifty-two"
NumberToWords.floorToWords 1255.20 == "one thousand, two hundred fifty-five"
NumberToWords.ceilingToWords 1255.20 == "one thousand, two hundred fifty-six"
```