Package Exports
- english-words-to-numbers
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (english-words-to-numbers) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
English Words to Numbers Converter
This package converts numbers expressed in English words (which can be mixed with Arabic numerals) into Arabic-only numbers.
Convert entire string
const wtn = require('english-words-to-numbers');
wtn('It was somewhere about 3 million, maybe 4 million at most.'); // 'It was somewhere about 3000000, maybe 4000000 at most.'
wtn('six point six million dollars and five cents'); // '6600000 dollars and 5 cents'
wtn('the repairs came up at fourty five hundred point five dollars'); // 'the repairs came up at 4500.5 dollars'
wtn('the total is 2.7 grand', { enableExtras: true }); // 'the total is 2700'
Return an array of converted numbers only
This feature is in development and not available yet.
const { numbers } = require('english-words-to-numbers');
numbers('this will require sixty to ninety days'); // [60, 90]