mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-12-21 01:41:46 +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));
|