# @jewarner57/easy-as-string

> A String Manipulation Helper Library

Latest version **1.1.2** (published 2021-04-13) · ISC license · 0 weekly downloads

## Install

```sh
npm install @jewarner57/easy-as-string
pnpm add @jewarner57/easy-as-string
yarn add @jewarner57/easy-as-string
bun add @jewarner57/easy-as-string
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.1.2 |
| Published | 2021-04-13 |
| First published | 2021-04-05 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 1 |
| Unpacked size | 9.3 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | Jonathan Warner |
| Maintainers | jewarner57 |
| Keywords | String, Helper, Javascript |

## Links

- npm: https://www.npmjs.com/package/@jewarner57/easy-as-string
- Repository: https://github.com/jewarner57/JSStringLibrary
- Homepage: https://github.com/jewarner57/JSStringLibrary#readme
- Issues: https://github.com/jewarner57/JSStringLibrary/issues
- npm.io page: https://npm.io/package/@jewarner57/easy-as-string

## Dependencies (1)

- [jest](https://npm.io/package/jest.md) ^26.6.3

## Alternatives

- [lodash.assign](https://npm.io/package/lodash.assign.md) — 2.3M weekly downloads
- [lodash.chunk](https://npm.io/package/lodash.chunk.md) — 1.8M weekly downloads
- [react-native-ios-utilities](https://npm.io/package/react-native-ios-utilities.md) — 138.5K weekly downloads
- [@technically/lodash](https://npm.io/package/@technically/lodash.md) — 50.9K weekly downloads
- [@fluid-topics/ft-icon](https://npm.io/package/@fluid-topics/ft-icon.md) — 20.6K weekly downloads

## Recent versions

- 1.1.2 (latest) — 2021-04-13
- 1.1.0 — 2021-04-08
- 1.0.6 — 2021-04-05
- 1.0.5 — 2021-04-05
- 1.0.4 — 2021-04-05
- 1.0.3 — 2021-04-05
- 1.0.2 — 2021-04-05
- 1.0.0 — 2021-04-05

## README

![npm (scoped)](https://img.shields.io/npm/v/@jewarner57/easy-as-string)
![GitHub last commit](https://img.shields.io/github/last-commit/jewarner57/JSStringLibrary)
![GitHub top language](https://img.shields.io/github/languages/top/jewarner57/JSStringLibrary)

## easy-as-string Library
I laugh in the face of complicated string problems. With this library, you can too.
<hr>

### Installation
* You can install this string library [here](https://www.npmjs.com/package/@jewarner57/easy-as-string) via npm

### Usage
* Below you will find the functions included in this library and how to use them.

<hr>

### String.prototype.capitalize()
* Capitalizes the first letter of a string.

``` javascript
"capitalize me".capitalize() -> "Capitalize me"
```

### String.prototype.upper()
* Capitalizes all characters in a string.

``` javascript
"upper me".upper() -> "UPPER ME"
```

### String.prototype.capitalizeWords()
* Capitalizes all words in a string.

``` javascript
"capitalize my words".capitalizeWords() -> "Capitalize My Words"
```

### String.prototype.capitalizeHeadline()
* Capitalizes all words in a string except: "the", "in", "a", "an", "and", "but", "for", "at", "by", "from"
* Always capitalizes the first word of the string.

``` javascript
"a headline from a publication".capitalizeHeadline() -> "A Headline from a Publication"
```

### String.prototype.removeExtraSpaces()
* Removes all types of white space. If two words have more than one white space character between them, a single space is left there.

``` javascript
"\n\n\n\n Destroy \t\t\t\r\rAll      Whitespace \n \t \r ".removeExtraSpaces() -> "Destroy All Whitespace"
```

### String.prototype.kebabCase()
* Lowercases string, removes extra spaces, and replaces spaces with "-"

``` javascript
"mAkE \n mE A   KeBaB  ".kebabCase() -> "make-me-a-kebab"
```

### String.prototype.snakeCase()
* Lowercases string, removes extra spaces, and replaces spaces with "_"

``` javascript
"mAkE \n mE A   sNaKE  ".snakeCase() -> "make_me_a_snake"
```

### String.prototype.camelCase()
* Removes all spaces, capitalizes each word except the first.

``` javascript
"MAKE thiS Camel case".camelCase() -> "makeThisCamelCase"
```

### String.prototype.shift()
* Shifts the first letter of the string to the end of the word.

``` javascript
"Hello World".shift() -> "elloWorldH"
```

### String.prototype.makeHashTag()
* Returns an array of the 3 longest words preceded by a hashtag.

``` javascript
"there was a potato and a beachball and a forest ".makeHashTag() -> ["#potato", "#beachball", "#forest"]
```

### String.prototype.isEmpty()
* Returns true if the given string contains only whitespace.

``` javascript
"\n\n\n   \t\t \r\r".isEmpty() -> true
"Some characters".isEmpty() -> false
```

---
_Source: https://npm.io/package/@jewarner57/easy-as-string · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
