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
Add string methods #425
Comments
Do we care to be compat with underscore.string? If not, I'd love for these (and other string functions) to be unicode safe. |
I'm using underscore.string, as well as others, as a reference. However, we'll follow the spec closer for methods like |
@mathiasbynens did a great blog post on it, though I'm sure you knew that already. 😛 I haven't done more, since there seems to be radio silence on the project (and because some of the other changes are more breaking), but for example: esamattis/underscore.string/issues/220. |
I would also put in a vote for camelize. Some form of strpad would be nice too. |
|
Keep in mind that many of the proposed methods (like |
I've added |
I went ahead and added support for |
Great news! Thanks/ I'm a bit confused about the kebabCase naming. Where does this convention come from? |
See Wikipedia:
In this case the words are the veggies 😀 |
Agreed, |
I like keeping it narrowed to established case conventions to avoid the wishy-washy-ness of the I think the docs cover it well. |
Beautifully said. |
Do you think we could get Taken from underscore.string documentation: numberFormat _.numberFormat(number, [ decimals=0, decimalSeparator='.', orderSeparator=','])
|
Not for 3.0.0. We've already added a lot & I want to stabilize and get it bumped out. |
Seems like Benchmark.js's |
…abCase`, `_.pad`, `_.padLeft`, `_.padRight`, `_.repeat`, `_.snakeCase`, `_.startsWith`, and `_.truncate`. [closes #425]
Thanks for the feedback all. Our string methods are locked-in for v3.0. |
For 3.0 I think it's time we adopt a few string methods.
I think we should start with
capitalize
,startsWith
,endsWith
,repeat
,trim
,trimLeft
,trimRight
, &truncate
Are there any others you all think should make the cut for 3.0?
The text was updated successfully, but these errors were encountered: