npm package: @ryanlsmith/string_lib
Description: A string Library for node
Author: Ryan Smith
Latest version: 2.1.5


[![Build Status](https://travis-ci.com/ryanlsmith4/strings_lib.svg?branch=master)](https://travis-ci.com/ryanlsmith4/strings_lib)

[![Coverage Status](https://coveralls.io/repos/github/ryanlsmith4/strings_lib/badge.svg?branch=master)](https://coveralls.io/github/ryanlsmith4/strings_lib?branch=master)


![npm bundle size](https://img.shields.io/bundlephobia/min/@ryanlsmith/string_lib.svg)


![npm](https://img.shields.io/npm/v/@ryanlsmith/string_lib.svg)

## Getting started
To get started, simply go into your project folder and run:
```
npm i @ryanlsmith/string_lib
```

This will install the string library into your application. To get access to the extended
functionallity that is provided by this library, add this to your `index.js` or whatever you're
using as your applications main point of entry:
```
require('@ryanlsmith/string_lib')
```

<!-- Generated by documentation.js. Update this documentation by updating the source code. -->

### Table of Contents

-   [firstLetterCap][1]
    -   [Examples][2]
-   [allCaps][3]
    -   [Examples][4]
-   [allFirstUpper][5]
    -   [Examples][6]
-   [oddCaps][7]
    -   [Examples][8]
-   [evenCaps][9]
    -   [Examples][10]
-   [removeExtraSpaces][11]
    -   [Parameters][12]
    -   [Examples][13]
-   [snakeCases][14]
    -   [Examples][15]
-   [camelCase][16]
    -   [Examples][17]

## firstLetterCap

Capitalize the first letter of the current string.

### Examples

```javascript
"this".capitalize() -> "This"
```

Returns **[String][18]** The capitalized version of the current string.

## allCaps

Uppercase every character within the string.

### Examples

```javascript
"this".allCaps() -> "THIS"
```

Returns **[String][18]** The entire string all capitalized of the current string.

## allFirstUpper

Uppercase every word within the string

### Examples

```javascript
"this word".capitalizeWords() -> "This Word"
```

Returns **[String][18]** with every first character in every word capitalized of the current string.

## oddCaps

Uppercase every other odd character not including white space.

### Examples

```javascript
"this".oddCaps() -> "tHiS"
```

Returns **[String][18]** of every odd character capitalized of the current string.

## evenCaps

Uppercase every even character not including white space.

### Examples

```javascript
"this".evenCaps() -> "ThIs"
```

Returns **[String][18]** of every even character capitalized of the current string.

## removeExtraSpaces

Remove any extra whitespace throughout the string.

### Parameters

-   `x`   (optional, default `''`)

### Examples

```javascript
"   this  word    ".removeExtraWhiteSpace() -> "this word"
```

Returns **[String][18]** with all the extra white space removed.

## snakeCases

Snake case the current string if it has spaces.

### Examples

```javascript
"snake this!".kabobCase() -> "snake_case!"
```

Returns **[String][18]** that is a snake cased version of the current string

## camelCase

Convert the current string to camel case if it has spaces.

### Examples

```javascript
"camel case these words!".camelCase() -> "camelCaseTheseWords"
```

Returns **[String][18]** that is a camel cased version of the current string

[1]: #firstlettercap

[2]: #examples

[3]: #allcaps

[4]: #examples-1

[5]: #allfirstupper

[6]: #examples-2

[7]: #oddcaps

[8]: #examples-3

[9]: #evencaps

[10]: #examples-4

[11]: #removeextraspaces

[12]: #parameters

[13]: #examples-5

[14]: #snakecases

[15]: #examples-6

[16]: #camelcase

[17]: #examples-7

[18]: https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String