Skip to content

Create addRestoreCaseException function #148

Open
umairda wants to merge 1 commit intoplurals:masterfrom
umairda:master
Open

Create addRestoreCaseException function #148
umairda wants to merge 1 commit intoplurals:masterfrom
umairda:master

Conversation

@umairda
Copy link

@umairda umairda commented Mar 14, 2020

I use the pluralize library frequently and wanted to be able to pluralize promo ID => promo IDs

I can add a plural rule but the restoreCase function restores the case so that the result is promo IDS

I created a function addRestoreCaseException which takes a token argument and pushes it to an array of restoreCaseExceptions

If a token is found in the array of restoreCaseExceptions then the token's case is not restored.

I also added a test and updated the readme.

@coveralls
Copy link

Coverage Status

Coverage remained the same at 100.0% when pulling 184e7d0 on umairda:master into abb3991 on blakeembrey:master.

@aviv
Copy link

aviv commented Feb 6, 2026

bumping this. it would be great to have a fix for this bug.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants