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

Underscore a word that starts with a capital letter returns a string prefixed with _ #98

Closed
elado opened this issue Aug 1, 2014 · 3 comments

Comments

@elado
Copy link

elado commented Aug 1, 2014

It seems, accordingly to the docs that it's intentional

S('CarSpeed').underscore().s; //'_car_speed'

Why? The expected result is car_speed, like the ruby equivalent

"CarSpeed".underscore # => "car_speed"

Same issue with dasherize which prefixes with -.

I can't seem to think of any case where I want the prefix. CSS vendor prefixes are an exception to dasherize but as this library is not meant specifically for CSS I wouldn't consider it.

@jprichardson jprichardson added this to the 2.0.0 milestone Aug 4, 2014
@jprichardson
Copy link
Owner

I completely agree with you. Since this is a breaking change, I'm gonna have to save it to 2.0.

@jprichardson
Copy link
Owner

Willing to submit a PR to fix this? Thanks.

@jprichardson
Copy link
Owner

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

No branches or pull requests

2 participants