mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-12-19 16:42:17 +03:00
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));
|