Ghost/ghost/admin/app/helpers/capitalize-first-letter.js
Simon Backx da3b3850f5 Added the newsletter name to the activity feed
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
2022-05-03 14:24:18 +02:00

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));