angular-filter icon indicating copy to clipboard operation
angular-filter copied to clipboard

ucfirst doesn't work with capitalized string

Open csimpi opened this issue 6 years ago • 1 comments

Hi, thank you for this awesome plugin!

I just noticed ucfirst filter doesn't work with fully capitalized string.

Expected behavior: hello leo => Hello Leo HELLO LEO => Hello Leo

Current behavior: hello leo => Hello Leo HELLO LEO => HELLO LEO

csimpi avatar Apr 23 '19 19:04 csimpi

I think the ucfirst only capitalize first character in each string and return the rest as it is. https://github.com/a8m/angular-filter/blob/0bc1607f2468bf003a8419718f42f310b1445bd9/dist/angular-filter.js#L2081

<p> {{ 'foo bar baz' | ucfirst }}</p>

<!--
result:
Foo Bar Baz
-->

bjarnef avatar Jul 04 '19 09:07 bjarnef