Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

cool-capitalize

git-alves2ISC1.0.0

Capitalize first letter of each word in a sentence

capitalize, uppercase

readme

Cool Capitalize

Simple function that capitalizes the first letter of each word in a sentence.

Installing

npm install cool-capitalize

or

yarn add cool-capitalize

Importing

ES5

const capitalize = require("cool-capitalize");

or ES6

import capitalize from "cool-capitalize";

Usage

const capitalized = capitalize("this is a sentence");

console.log(capitalized);
// This Is A Sentence