words-to-decimal

a parser to translate words to numbers

Usage no npm install needed!

<script type="module">
  import wordsToDecimal from 'https://cdn.skypack.dev/words-to-decimal';
</script>

README

Words To Decimal

Parse words and evaluate the results.

npm install words-to-decimal

TODO: add fuzzy logic

Basic Examples

import { wordsToDecimal } from 'words-to-decimal';
wordsToDecimal('half'); // 0.5
wordsToDecimal('one and half'); // 1.5
wordsToDecimal('three quarters'); // 0.75