# @matthewwei35/string_lib

> This library contains functions used to manipulate strings.

Latest version **1.1.0** (published 2021-04-08) · ISC license · 0 weekly downloads

## Install

```sh
npm install @matthewwei35/string_lib
pnpm add @matthewwei35/string_lib
yarn add @matthewwei35/string_lib
bun add @matthewwei35/string_lib
```

## 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.0 |
| Published | 2021-04-08 |
| First published | 2021-04-05 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 9 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | Matthew Wei |
| Maintainers | matthewwei35 |

## Links

- npm: https://www.npmjs.com/package/@matthewwei35/string_lib
- Repository: https://github.com/matthewwei35/FEW-2.1_MW_String_Lib
- Homepage: https://github.com/matthewwei35/FEW-2.1_MW_String_Lib#readme
- Issues: https://github.com/matthewwei35/FEW-2.1_MW_String_Lib/issues
- npm.io page: https://npm.io/package/@matthewwei35/string_lib

## Recent versions

- 1.1.0 (latest) — 2021-04-08
- 1.0.3 — 2021-04-06
- 1.0.2 — 2021-04-06
- 1.0.1 — 2021-04-05
- 1.0.0 — 2021-04-05

## README

# String Library

![npm](https://img.shields.io/npm/v/@matthewwei35/string_lib)
![GitHub followers](https://img.shields.io/github/followers/matthewwei35?style=social)
 
## Description
This library contains functions used to manipulate strings.

## Functions
```javascript
upperFirst(str)       // Upper cases the first letter of the first word
// Input:   'hello world'
// Output:  'Hello world'

allCaps(str)          // Upper cases every letter
// Input:   'hello world'
// Output:  'HELLO WORLD'

capitalizeWords(str)  // Upper cases the first letter of every word
// Input:   'hello world'
// Output:  'Hello World'

removeExtraSpace(str) // Removes any extra spaces and keeps single spaces between words
// Input:   '   hello    world   '
// Output:  'hello world'

kebabCase(str)        // Changes the format of string to kebabCase
// Input:   'hello world'
// Output:  'hello-world'

snakeCase(str)        // Changes the format of string to snakeCase
// Input:   'hello world'
// Output:  'hello_world'

camelCase(str)        // Changes the format of string to camelCase
// Input:   'hello world'
// Output:  'helloWorld'

shift(str)            // Shifts the first letter of the first word to the back
// Input:   'hello world'
// Output:  'ello worldh'

makeHashTag(str)      // Changes format of 3 longest words to hashtags
// Input:   'Amazing bongo drums for sale'
// Output:  ['#amazing', '#bongo', '#drums']

isEmpty(str)          // Checks if the string is empty
// Input:   'hello world'
// Output:  False
```

### Helper Functions
```javascript
lowerFirst(str)         // Lower cases the first letter of the first word

removeItem(array, item) // Removes a given item in a given array
```

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