A tiny utility library with no dependencies that parses words representing numbers into their numeric values. Supports a wide variety of inputs, such as:
npm i --save numbers-from-words
Import the parse
function call it with the input string containing words
defining a number/quantity.
import { parse } from 'numbers-from-words'
const numberA = parse('twenty two')
const numberB = parse('one thousand and twenty three')
const numberC = parse('zero')
console.log({
numberA, // 22
numberB, // 1023
numberC // 0
})
See CHANGELOG.md for more information.
Distributed under the MIT license. See LICENSE.md for more information.
git checkout -b my-new-feature
)git commit -am 'Add some feature'
)git push origin my-new-feature
)