reports/frontend/node_modules/es-toolkit/dist/compat/string/capitalize.mjs
jtricerolph 1c411e402e Add settings page for managing forecasting API key and URL via UI
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-07-20 14:37:36 +00:00

19 lines
631 B
JavaScript

import { capitalize as capitalize$1 } from "../../string/capitalize.mjs";
import { toString } from "../util/toString.mjs";
//#region src/compat/string/capitalize.ts
/**
* Converts the first character of string to upper case and the remaining to lower case.
*
* @param string - The string to capitalize.
* @returns The capitalized string.
*
* @example
* const convertedStr1 = capitalize('fred') // returns 'Fred'
* const convertedStr2 = capitalize('FRED') // returns 'Fred'
* const convertedStr3 = capitalize('') // returns ''
*/
function capitalize(str) {
return capitalize$1(toString(str));
}
//#endregion
export { capitalize };