Skip to content
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

_.words handles numbers differently when converting cases #3561

Closed
jonathanseneris opened this issue Dec 23, 2017 · 3 comments
Closed

_.words handles numbers differently when converting cases #3561

jonathanseneris opened this issue Dec 23, 2017 · 3 comments
Labels

Comments

@jonathanseneris
Copy link

Several previous issues state that numbers are considered words, but regular language strings do this differently from camelCase or snakeCase.

When:

  1. _.words('my 1st birthday')
  2. _.words('my_1st_birthday')
  3. _.words('my1stBirthday')

Expected:
All would return either
["my", "1", "st", "birthday"]
or
["my", "1st", "birthday"]

Actual:

  1. ["my", "1st", "birthday"]
  2. ["my", "1", "st", "birthday"]
  3. ["my", "1", "st", "birthday"]

Is it expected that 'nth' is viewed differently in a regular string vs camel or snake case?

@jdalton
Copy link
Member

jdalton commented Dec 23, 2017

They should all be treated like 1. 😋

@jdalton jdalton added the bug label Dec 23, 2017
@jdalton
Copy link
Member

jdalton commented Dec 29, 2017

Thanks @jonathanseneris!

@lock
Copy link

lock bot commented Dec 29, 2018

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@lock lock bot locked as resolved and limited conversation to collaborators Dec 29, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.