/**
 * @license Copyright (c) 2017-2025, CKSource Holding sp. z o.o. All rights reserved.
 * For licensing, see LICENSE.md.
 */

'use strict';

/**
 * Capitalizes the first letter of a string.
 */
module.exports = function capitalize( str ) {
	if ( typeof str !== 'string' ) {
		return '';
	}

	return str.charAt( 0 ).toUpperCase() + str.slice( 1 );
};
