Author: | f3rno64 |
---|---|
Views Total: | 66 views |
Official Page: | Go to website |
Last Update: | December 28, 2023 |
License: | MIT |
Preview:

Description:
numbers-from-words is a zero-dependency JavaScript library that converts number words like “one hundred twenty three” into numeric values “123”.
If your application accepts number inputs as words, this utility library can parse them into numbers for calculations and processing.
See Also:
- JavaScript Library To Convert Numbers To Words – numberToWordsJS
- Convert Numbers Into English Words
- Convert Large Numbers Into Words – digit.js
How to use it:
1. Install the numbers-from-words
package with NPM and import the parse
component as follows:
# NPM $ npm install numbers-from-words
import { parse } from 'numbers-from-words'
2. Call the parse function with a string containing number words as the argument to get the numeric value. For example:
// 123 const numberCon = parse('one hundred and twenty three');