Files
lodash/upperFirst.js
John-David Dalton 6cb3460fce Remove semicolons.
2017-02-05 22:22:04 -08:00

22 lines
517 B
JavaScript

import createCaseFirst from './.internal/createCaseFirst.js'
/**
* Converts the first character of `string` to upper case.
*
* @since 4.0.0
* @category String
* @param {string} [string=''] The string to convert.
* @returns {string} Returns the converted string.
* @see camelCase, kebabCase, lowerCase, snakeCase, startCase, upperCase
* @example
*
* upperFirst('fred')
* // => 'Fred'
*
* upperFirst('FRED')
* // => 'FRED'
*/
const upperFirst = createCaseFirst('toUpperCase')
export default upperFirst