markbates / markbates/inflect

The `humanize` function should recognize Acronyms.

Open
#19 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Go
Stars
23
Forks
17
PR merge metrics
No merged PRs in 30d

Description

It appears that humanize is does not discriminate ACRONYMS from camelCase.
It probably should?

For example:
"FBI" | humanize => "FBI"
"M.I.T" | humanize => "M.I.T"

Consider cases of PascalCase words, like `McDaniel` as well? Not sure if this would prove more irritating than desirable...:
"Patrick-McDaniel-MD" | humanize => "Patrick McDaniel MD"

Keeping the otherwise expected behavior:
"myActualCamelCase" | humanize => "My actual camel case"
"hole-in-the-wall" | humanize => "Hole in the wall"

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start at the humanize function entry point and inspect its existing behavior for acronyms, PascalCase words, camelCase, and hyphenated text. Add or update coverage for the examples in the issue, including the expected acronym and McDaniel handling; done means those examples produce the stated humanized strings without regressing the existing cases.

Written by the indexing model from the issue text.

Assessment

Tech stack
go
Domain
tooling
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.