Skip to content

upperFirst

Uppercases the first character of a string and leaves the rest of the string unchanged.

Importing

ts
import { upperFirst } from '@almighty-shogun/utils';

Usage

ts
import { upperFirst } from '@almighty-shogun/utils';

const label = upperFirst('settings');

// 'Settings'

Parameters

value: string
String to transform.

Returns

The string with its first character uppercased.

Type signature

ts
declare function upperFirst(value: string): string;

All packages are released under the MIT License.