Skip to content

ericanaglik/kevin-string

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Kevin String

npm GitHub repo size Build Status Coverage Status

Getting Started

Run the following command in your project folder:

npm install @ericanaglik/kevin-string --save

Then add this to your index.js file

require('@ericanaglik/src/kevin-string')

Capitalization

capitalize()
This method capitalizes the first letter of an entire string
'hello world!'.capitalize() → "Hello world!"

allCaps()
This method capitalizes ALL letters in a string
'hello world!'.allCaps() → "HELLO WORLD!"

capitalizeWords()
This method capitalizes the first letter of every word in a string
'hello world!'.capitalizeWords() → "Hello World!"

Special Casing

kabobCase()
This method transforms a string into lower case and separates words with hyphens
'Hello World'.kabobCase() → "hello-world"

snakeCase()
This method transforms a string into lower case and separates words with an underscore
'Hello World'.snakeCase() → "hello_world"

camelCase()
This method removes spaces from a string and capitalizes the first letter of each word following the first word
'Hello World'.camelCase() → "helloWorld"

Spacing

removeExtraSpaces()
This method removes excess spaces around words (leaves single space)
' Hello World '.removeAllSpaces() → "Hello World"

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published