Skip to content

saravana2107/node-capitalize

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

node-capitalize

To capitalize the first letter or first letter of all words in a string.

Installation

To install node-capitalize, use npm:

npm i node-capitalize -S

Usage

import capitalize from 'node-capitalize';

capitalize('your only limit is you');
/* 'Your only limit is you' */

capitalize('your only limit is you', true);
/* 'Your Only Limit Is You' */

capitalize('yOuR oNlY lImIt Is YoU');
/* 'Your only limit is you' */

capitalize(`i'm feeling curious`);
/* `I'm feeling curious` */

Options

  • string - define the string to capitalize. (default: 32)
  • words - define whether the output should be capitalize first letter in each word. (default: false) [OPTIONAL]

Tests

npm install
npm test

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published