word-to-numbers

1.0.0 • Public • Published

Word to Numbers

Convert written numbers into digits.

Supports written integers or decimals between 0 to 999,999,999,999,999.

Additional language support coming soon.

Installation

npm install word-to-numbers

Usage

const wordToNum = require('word-to-numbers');
 
 
wordToNum("one"); // 1
 
wordToNum("three point one four one six"); // 3.1416
 
wordToNum("FIFTY-FIFTY"); // "50-50"
 
wordToNum("The answer is Forty-Two"); // "The answer is 42"
 
wordToNum("The odds are three thousand seven hundred and twenty to one!"); // "The odds are 3720 to 1!"
 
wordToNum("fifty trillion and three") // 50000000000003

Package Sidebar

Install

npm i word-to-numbers

Weekly Downloads

295

Version

1.0.0

License

MIT

Unpacked Size

8.72 kB

Total Files

7

Last publish

Collaborators

  • nicholastribe