billysbilling/billy-data — pull request #22 by mex (2013-11-14 01:24:38+00:00)
Title: Moves inflectors to external module

- Moves pluralize, singularize, and classify to Inflectors module
- Adds adding/deleting of plural rules
- Adds tests for classify and adding/deleting of plural rules

Overrides to rules (currently stored in BD.plurals) are moved inside the new Inflectors module. This means variables stored in BD.plurals will no longer be applied, but should instead be added by running BD.addInflectorsRule() with plural form as the first property and singular form as the second property. Likewise overrides can be deleted by running BD.removeInflectorsRule() with the plural form as the argument.
The change from a static overrides hash to methods will allow us to easily expand the add/remove rules functionality to support regular expressions.