words-to-numbers
Advanced tools
Comparing version 1.1.3 to 1.2.0
{ | ||
"name": "words-to-numbers", | ||
"description": "convert textual words to numbers with optional fuzzy text matching", | ||
"version": "1.1.3", | ||
"version": "1.2.0", | ||
"license": "MIT", | ||
@@ -6,0 +6,0 @@ "options": { |
@@ -61,2 +61,23 @@ # Words To Numbers | ||
## Ordinal Numbers | ||
```javascript | ||
import wordsToNumbers from 'words-to-numbers'; | ||
wordsToNumbers('first'); //1 | ||
wordsToNumbers('second'); //2 | ||
wordsToNumbers('third'); //3 | ||
wordsToNumbers('fourteenth'); //14 | ||
wordsToNumbers('twenty fifth'); //25 | ||
wordsToNumbers('thirty fourth'); //34 | ||
wordsToNumbers('forty seventh'); //47 | ||
wordsToNumbers('fifty third'); //53 | ||
wordsToNumbers('sixtieth'); //60 | ||
wordsToNumbers('seventy second'); //72 | ||
wordsToNumbers('eighty ninth'); //89 | ||
wordsToNumbers('ninety sixth'); //96 | ||
wordsToNumbers('one hundred and eighth'); //108 | ||
wordsToNumbers('one hundred and tenth'); //110 | ||
wordsToNumbers('one hundred and ninety ninth'); //199 | ||
``` | ||
## Commonjs | ||
@@ -63,0 +84,0 @@ |
20127
88