Socket
Socket
Sign inDemoInstall

capital-case

Package Overview
Dependencies
4
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    capital-case

Transform into a space separated string with each word capitalized


Version published
Weekly downloads
4.7M
decreased by-10.92%
Maintainers
1
Install size
98.4 kB
Created
Weekly downloads
 

Package description

What is capital-case?

The capital-case npm package is used to convert strings into capital case where the first letter of each word is capitalized and spaces are preserved between words. It is particularly useful for formatting text to be more readable or to adhere to stylistic guidelines where capital case is required.

What are capital-case's main functionalities?

Convert string to capital case

This feature allows you to convert any lowercase or mixed case string into capital case, where each word starts with a capital letter and all other letters are lower case.

const { capitalCase } = require('capital-case');

const result = capitalCase('string to convert');
console.log(result); // 'String To Convert'

Other packages similar to capital-case

Readme

Source

Capital Case

NPM version NPM downloads Bundle size

Transform into a space separated string with each word capitalized.

Installation

npm install capital-case --save

Usage

import { capitalCase } from "capital-case";

capitalCase("string"); //=> "String"
capitalCase("dot.case"); //=> "Dot Case"
capitalCase("PascalCase"); //=> "Pascal Case"
capitalCase("version 1.2.10"); //=> "Version 1 2 10"

The function also accepts options.

License

MIT

Keywords

FAQs

Last updated on 03 Dec 2019

Did you know?

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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc