-
-
Notifications
You must be signed in to change notification settings - Fork 92
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Provide a custom array of additions to the lowercase words? #282
Comments
I have released support for this is the latest version: https://github.com/blakeembrey/change-case/releases/tag/title-case%404.1.0. Thanks for the issue! It wasn't as easy as just splitting on whitespace due to all the quirks around punctuation, but I believe I have a reasonable fix to support this and not degrade any of the existing behavior. |
kodiakhq bot
pushed a commit
to timelessco/next-ts-app
that referenced
this issue
Oct 8, 2023
[![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [title-case](https://togithub.com/blakeembrey/change-case/tree/master/packages/title-case#readme) ([source](https://togithub.com/blakeembrey/change-case)) | [`3.0.3` -> `4.1.0`](https://renovatebot.com/diffs/npm/title-case/3.0.3/4.1.0) | [![age](https://developer.mend.io/api/mc/badges/age/npm/title-case/4.1.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/npm/title-case/4.1.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/npm/title-case/3.0.3/4.1.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/title-case/3.0.3/4.1.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | --- ### Release Notes <details> <summary>blakeembrey/change-case (title-case)</summary> ### [`v4.1.0`](https://togithub.com/blakeembrey/change-case/releases/tag/title-case%404.1.0): Add small words option [Compare Source](https://togithub.com/blakeembrey/change-case/compare/8d3793fa2fc1646c4c2e1fba036681a42f8cdab9...title-case@4.1.0) **Added** - Add a `smallWords` to an optional config object provided to `titleCase` [blakeembrey/change-case#282 **Fixed** - Fixes an issue where a word ending in `.` would be ignored inside quotes [blakeembrey/change-case#266 ### [`v4.0.1`](https://togithub.com/blakeembrey/change-case/compare/title-case@4.0.0...8d3793fa2fc1646c4c2e1fba036681a42f8cdab9) [Compare Source](https://togithub.com/blakeembrey/change-case/compare/title-case@4.0.0...8d3793fa2fc1646c4c2e1fba036681a42f8cdab9) ### [`v4.0.0`](https://togithub.com/blakeembrey/change-case/releases/tag/title-case%404.0.0): ESM support [Compare Source](https://togithub.com/blakeembrey/change-case/compare/title-case@3.0.3...title-case@4.0.0) **Changed** - Removes CommonJS support and adds ESM import support for node 16+ - Adds an optional `locale` as the second argument (now defaults to host environment using `toLocaleUpperCase` </details> --- ### Configuration 📅 **Schedule**: Branch creation - "before 4am on Monday" in timezone Asia/Kolkata, Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR is behind base branch, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, check this box --- This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://developer.mend.io/github/timelessco/next-ts-app).
kodiakhq bot
pushed a commit
to timelessco/recollect
that referenced
this issue
Oct 8, 2023
[![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [title-case](https://togithub.com/blakeembrey/change-case/tree/master/packages/title-case#readme) ([source](https://togithub.com/blakeembrey/change-case)) | [`3.0.3` -> `4.1.0`](https://renovatebot.com/diffs/npm/title-case/3.0.3/4.1.0) | [![age](https://developer.mend.io/api/mc/badges/age/npm/title-case/4.1.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/npm/title-case/4.1.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/npm/title-case/3.0.3/4.1.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/title-case/3.0.3/4.1.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | --- ### Release Notes <details> <summary>blakeembrey/change-case (title-case)</summary> ### [`v4.1.0`](https://togithub.com/blakeembrey/change-case/releases/tag/title-case%404.1.0): Add small words option [Compare Source](https://togithub.com/blakeembrey/change-case/compare/8d3793fa2fc1646c4c2e1fba036681a42f8cdab9...title-case@4.1.0) **Added** - Add a `smallWords` to an optional config object provided to `titleCase` [blakeembrey/change-case#282 **Fixed** - Fixes an issue where a word ending in `.` would be ignored inside quotes [blakeembrey/change-case#266 ### [`v4.0.1`](https://togithub.com/blakeembrey/change-case/compare/title-case@4.0.0...8d3793fa2fc1646c4c2e1fba036681a42f8cdab9) [Compare Source](https://togithub.com/blakeembrey/change-case/compare/title-case@4.0.0...8d3793fa2fc1646c4c2e1fba036681a42f8cdab9) ### [`v4.0.0`](https://togithub.com/blakeembrey/change-case/releases/tag/title-case%404.0.0): ESM support [Compare Source](https://togithub.com/blakeembrey/change-case/compare/title-case@3.0.3...title-case@4.0.0) **Changed** - Removes CommonJS support and adds ESM import support for node 16+ - Adds an optional `locale` as the second argument (now defaults to host environment using `toLocaleUpperCase` </details> --- ### Configuration 📅 **Schedule**: Branch creation - "before 4am on Monday" in timezone Asia/Kolkata, Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR is behind base branch, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, check this box --- This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://developer.mend.io/github/timelessco/bookmark-tags).
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I have a situation where I have to title case for a specific type of work which prefers the lowercasing of "from".
Related:
#265
From what I understood this is not "AP", but acceptable enough. So this lead me to think, wouldn't it be nice to provide a list of "additions " to the lowercase word list as an argument to the titleCase()-function. Assuming that there may be more words that fall into this gray-ish category (an assumption I did not verify, by the way).
I could fairly easily wrap titleCase() in a custom function adding this functionality, but nevertheless, this might be a usefull addition to this pacakge.
The text was updated successfully, but these errors were encountered: