# stringamabob

> A JS library for strings.

Latest version **1.0.1** (published 2023-08-25) · ISC license · 0 weekly downloads

## Install

```sh
npm install stringamabob
pnpm add stringamabob
yarn add stringamabob
bun add stringamabob
```

## 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.0.1 |
| Published | 2023-08-25 |
| First published | 2023-08-25 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 7 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | Vithusha Ravirajan |
| Maintainers | vithusha |
| Keywords | string, manipulation, formatting, conversion, transformation, capitalize, uppercase, lowercase, kebob-case, snake-case, camel-case, shift, hashtag, whitespace, trim, split, join, utility, functions, javascript, toolkit |

## Links

- npm: https://www.npmjs.com/package/stringamabob
- npm.io page: https://npm.io/package/stringamabob

## 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.0.1 (latest) — 2023-08-25
- 1.0.0 — 2023-08-25

## README

# String Functions Library
![version](https://img.shields.io/npm/v/stringamabob.svg)
![downloads](https://img.shields.io/npm/dm/stringamabob.svg)

A library of JavaScript functions for various string manipulations.

## Installation

```javascript
npm install stringamabob  
```

## API

### 1. capitalize(str)

- **Description**: Capitalizes the first letter of the string.
- **Example**: 
```javascript
capitalize('hello') //returns "Hello"
```

### 2. allCaps(str)

- **Description**: Converts all characters in the string to uppercase.
- **Example**: 
```javascript
allCaps('hello') //returns "HELLO"
```

### 3. capitalizeWords(str)

- **Description**: Capitalizes the first letter of each word in the string.
- **Example**: 
```javascript
capitalizeWords('foo bar') //returns "Foo Bar"
```

### 4. removeExtraSpaces(str)

- **Description**: Removes any leading/trailing spaces and condenses multiple spaces to a single space.
- **Example**: 
```javascript
removeExtraSpaces('  hello  world  ') //returns "hello world"
```

### 5. kebobCase(str)

- **Description**: Converts a string into kebob-case.
- **Example**:
```javascript
 kebobCase('Hello World') //returns "hello-world"
```

### 6. snakeCase(str)

- **Description**: Converts a string into snake_case.
- **Example**: 
```javascript
snakeCase('Hello World') //returns "hello_world"
```

### 7. camelCase(str)

- **Description**: Converts a string into camelCase.
- **Example**: 
```javascript
camelCase('hello world') //returns "helloWorld"
```

### 8. shift(str, n = 1)

- **Description**: Shifts characters in a string by a specified number.
- **Example**: 
```javascript
shift('hello', 2) //returns "llohe"
```


### 9. makeHashTag(str)

- **Description**: Generates hashtags from the input string. Prioritizes longer words if more than three words are given.
- **Example**: 
```javascript
makeHashTag('hello world') //returns ["#Hello", "#World"]
```

### 10. isEmpty(str)

- **Description**: Checks if the string is empty or just whitespace.
- **Example**: 
```javascript
isEmpty('  ') //returns true
```

## npm Link

You can find the library on npm [here](https://www.npmjs.com/package/stringamabob).

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