allalgorithms-js

Capitalize

Method converts the first character of a string to capital (uppercase) letter. If the string has its first character as capital, then it returns the original string

Install

npm install allalgorithms

Usage

const allalgorithms = require('allalgorithms');

const str = 'framework for managing your configuration';

console.log(allalgorithms.strings.capitalize(str));
// -> Framework For Managing Your Configuration

API

capitalize(str)

Returns capitalized string

Params: