seti-ramesesv1
Version:
Reusable components and context for Next.js apps
16 lines (13 loc) • 659 B
JavaScript
import formatMuiErrorMessage from '../formatMuiErrorMessage/formatMuiErrorMessage.js';
// It should to be noted that this function isn't equivalent to `text-transform: capitalize`.
//
// A strict capitalization should uppercase the first letter of each word in the sentence.
// We only handle the first word.
function capitalize(string) {
if (typeof string !== 'string') {
throw new Error(process.env.NODE_ENV !== "production" ? 'MUI: `capitalize(string)` expects a string argument.' : formatMuiErrorMessage(7));
}
return string.charAt(0).toUpperCase() + string.slice(1);
}
export { capitalize as default };
//# sourceMappingURL=capitalize.js.map