1.1.1 • Published 1 year ago

numbertowords-solidity v1.1.1

Weekly downloads
-
License
MIT
Repository
github
Last release
1 year ago

Number To Word Solidity Library

This library was made by refractoring the following number-to-words repository: https://github.com/marlun78/number-to-words

Contains some util methods for converting numbers into words.

Install

npm install numbertowords-solidity

Usage

API

toWords(number)

Converts an integer into words.

import "numbertowords-solidity/contracts/NumberToWords.sol";

NumberToWords.toWords(13); // => “thirteen”

NumberToWords.toWords(56); // => “fifty-six”

// Large numbers:
NumberToWords.toWords(9007199254740992); // => “nine quadrillion, seven trillion, one hundred ninety-nine billion, two hundred fifty-four million, seven hundred forty thousand, nine hundred ninety-two”

Acknowledgments

Thank You

Feel free to contact me at

LinkedIn