data_uncapitalize-first-letter.js

/**
 * @function uncapitalizeFirstLetter
 * @description Uncapitalize the first letter of a string.
 *
 * @since 1.0.0
 *
 * @param {string} string The string to uncapitalize.
 * @param {string} locale The locale to use for uncapitalization.
 *
 * @return {string} The uncapitalized string.
 */
const uncapitalizeFirstLetter = ( string = '', locale = 'en-US' ) => {
	if ( ! string ) {
		return string;
	}
	return string.charAt( 0 ).toLocaleLowerCase( locale ) + string.slice( 1 );
};

export default uncapitalizeFirstLetter;