Skip to content

Conversation

az7arul
Copy link
Contributor

@az7arul az7arul commented Mar 16, 2015

No description provided.

@az7arul
Copy link
Contributor Author

az7arul commented Mar 16, 2015

@az7arul
Copy link
Contributor Author

az7arul commented May 30, 2015

any feedback on this ?

@stoeffel
Copy link
Collaborator

I will check it tomorrow

@stoeffel
Copy link
Collaborator

I think if we change the behaviour of underscored we should change dasherize too.
WIth your change they would behave differently.
i.e.

dasherize('oneAtATime'); // => 'one-at-a-time'
dasherize('ATime'); // => '-a-time'
dasherize('ONETime'); // => '-o-n-e-time'

underscored('oneAtATime'); // => 'one_at_a_time'
underscored('ATime'); // => 'a_time'
underscored('ONETime'); // => 'one_time'

The only different should be that dasherize prefixes the sting with a dash if it starts with an uppercase.

@epeli do you agree that we should change both functions to the behaviour proposed by @az7arul ?

btw. related #89 #156

underscored.js Outdated
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does this not have to be global (test case please)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yup it needs to be global

@az7arul az7arul force-pushed the fix-underscore-for-single-word branch from 63450a0 to 996afda Compare June 2, 2015 19:38
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