# @jimuelpalaca/str

> A string helper class for nodejs

Latest version **0.0.2** (published 2021-02-03) · MIT license · 0 weekly downloads

## Install

```sh
npm install @jimuelpalaca/str
pnpm add @jimuelpalaca/str
yarn add @jimuelpalaca/str
bun add @jimuelpalaca/str
```

## Health

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

Positive: has types; no vulnerabilities; high quality score.

Warnings: low downloads; no esm support; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.0.2 |
| Published | 2021-02-03 |
| First published | 2021-02-03 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 14.5 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | Jimuel Palaca |
| Maintainers | jimuelpalaca |
| Keywords | String Helper, String, Lightweight |

## Links

- npm: https://www.npmjs.com/package/@jimuelpalaca/str
- Repository: https://github.com/jimuelpalaca/str
- Homepage: https://github.com/jimuelpalaca/str#readme
- Issues: https://github.com/jimuelpalaca/str/issues
- npm.io page: https://npm.io/package/@jimuelpalaca/str

## 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

- 0.0.2 (latest) — 2021-02-03
- 0.0.1 — 2021-02-03

## README

# Str

A simple string helper for NodeJS Project

# How to install

```bash
npm install @jimuelpalaca/str
```

# Usage

## random(len)
```js
import { Str } from '@jimuelpalaca/str';

console.log(Str.random(15));
// => 'dsydbmuesftlbx6'

// By default length is 10
console.log(Str.random())
// => 'uhgbsrzp72'

```

## ucWords(str)
```js
import { Str } from '@jimuelpalaca/str';

const str = 'page title';
console.log(Str.ucWords(str));
// => 'Page Title'
```

## toSlug(str)
```js
import { Str } from '@jimuelpalaca/str';

const str = 'page title';
console.log(Str.toSlug(str));
// => 'page-title';
```

## slugToWord(str)
```js
import { Str } from '@jimuelpalaca/str';

const str = 'page-title';
console.log(Str.slugToWord(str));
// => 'Page Title';
```

## toSnakeCase(str)
```js
import { Str } from '@jimuelpalaca/str';

const str = 'page title';
console.log(Str.toSnakeCase(str));
// => 'page_title';
```

## snakeToWord(str)
```js
import { Str } from '@jimuelpalaca/str';

const str = 'page_title';
console.log(Str.snakeToWord(str));
// => 'Page Title';
```

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