# strmanip

> Provides manipulation tools for working with strings

Latest version **1.2.1** (published 2023-10-22) · ISC license · 0 weekly downloads

## Install

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

## 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.2.1 |
| Published | 2023-10-22 |
| First published | 2023-10-21 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 16.8 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Maintainers | nittwit_ |

## Links

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

## Recent versions

- 1.2.1 (latest) — 2023-10-22
- 1.2.0 — 2023-10-22
- 1.1.0 — 2023-10-21
- 1.0.1 — 2023-10-21
- 1.0.0 — 2023-10-21

## README

# StrManip

StrManip is an npm package that provides various string manipulation and validation utilities. It includes the following features:

- Base64 encoding and decoding.
- Regular expression helpers.
- String truncation.
- Email address validation.

## Installation

You can install StrManip via npm:

```bash
npm i strmanip
```

## Usage

### Base64 Encoding and Decoding

```javascript
const { Base64 } = require('StrManip');

const encoded = Base64.encode('Hello, World!');
const decoded = Base64.decode(encoded);

console.log(encoded); // SGVsbG8sIFdvcmxkIQ==
console.log(decoded); // Hello, World!
```

### Regular Expression Helpers

```javascript
const { Strings } = require('StrManip');

const isValidEmail = Strings.isValidEmail('test@example.com');
console.log(isValidEmail); // true

const truncatedText = Strings.truncate('This is a long text that needs truncation.', 20);
console.log(truncatedText); // "This is a long text..."

const findAndReplace = Strings.findAndReplace('This is an input', ' ', '_')
console.log(findAndReplace); // "This_is_an_input"

if (Strings.find(findAndReplace, '_')) {
    findAndReplace = Strings.findAndReplace(findAndReplace, '_' ' ')
    console.log(findAndReplace); // "This is an input"
}
```

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