You're Invited:Meet the Socket Team at BlackHat and DEF CON in Las Vegas, Aug 4-6.RSVP
Socket
Book a DemoInstallSign in
Socket

@kickass-coderz/capitalize-title

Package Overview
Dependencies
Maintainers
2
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@kickass-coderz/capitalize-title

This package provides a utility function to capitalize titles according to (The Chicago Manual of Style.)[http://www.chicagomanualofstyle.org/]

0.0.0
latest
npmnpm
Version published
Weekly downloads
0
-100%
Maintainers
2
Weekly downloads
 
Created
Source

Capitalize Title

This package provides a utility function to capitalize titles according to (The Chicago Manual of Style.)[http://www.chicagomanualofstyle.org/]

Installation

// with npm
npm install @kickass-coderz/capitalize-title

// with yarn
yarn add @kickass-coderz/capitalize-title

// with pnpm
pnpm add @kickass-coderz/capitalize-title

Usage

Import the function and use it to capitalize a title.

import { capitalizeTitle } from "@kickass-coderz/capitalize-title";

const title = capitalizeTitle("i'M a MaD sCiEnTiSt");

// This will result with "I'm a Mad Scientist"

Pass an array of special words which shouldn't be capitalized.

import { capitalizeTitle } from "@kickass-coderz/capitalize-title";

const title = capitalizeTitle("acme is the best company", ["acme"]);

// This will result with "acme Is the Best Company"

FAQs

Package last updated on 24 Jan 2025

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts