mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-11-29 07:09:48 +03:00
da3b3850f5
refs https://github.com/TryGhost/Team/issues/1563 - When a member (un)subscribes to a specific newsletter, we should add the name of the newsletter. - Replaced CSS lowercase/first uppercase transform with a new HBS helper so we can maintain the caps in the newsletter names. - Copy is still WIP, refs https://ghost.slack.com/archives/C02G9E68C/p1651569897474819
11 lines
319 B
JavaScript
11 lines
319 B
JavaScript
import {helper} from '@ember/component/helper';
|
|
|
|
export function capitalizeFirstLetter(string) {
|
|
if (typeof string !== 'string' || string.length === 0) {
|
|
return string;
|
|
}
|
|
return string.charAt(0).toUpperCase() + string.slice(1);
|
|
}
|
|
|
|
export default helper(([string]) => capitalizeFirstLetter(string));
|