danhper / lodash-inflection

ActiveSupport::Inflector, for lodash!
MIT License
30 stars 6 forks source link

Improves singular and plural regexes for better accuracy on edge cases #10

Closed solgarius closed 7 years ago

solgarius commented 7 years ago

Fixes #9 The regexes used in the PR are based off underscore.inflections library a more recently supported inflection library for underscore that covers more edge cases than underscore.inflection

Tests have been improved to cover singularizing already singular words and pluralizing already plural words, with several more word combinations used in the test.

coveralls commented 7 years ago

Coverage Status

Coverage increased (+0.08%) to 98.438% when pulling 1f9ce99ce847b04a627b48591b55e41d0185bea2 on solgarius:fix-unusual-cases into 9fe13a51028b7a2f5077c1927dc2c9d43509ad1b on tuvistavie:master.

danhper commented 7 years ago

Thank you, I just published version 1.5.0 with your changes.