# textspace

> Censor your text with textspace package. It is a simple package to censor your text.

Latest version **1.0.5** (published 2022-06-27) · ISC license · 0 weekly downloads

## Install

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

## Health

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

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

Warnings: low downloads; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.5 |
| Published | 2022-06-27 |
| First published | 2022-06-26 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 18.1 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 3 |
| Author | emresengul |
| Maintainers | emresengul |
| Keywords | text censor, censor, text |

## Links

- npm: https://www.npmjs.com/package/textspace
- Repository: https://github.com/emresengul/textspace
- Homepage: https://github.com/emresengul/textspace#readme
- Issues: https://github.com/emresengul/textspace/issues
- npm.io page: https://npm.io/package/textspace

## Alternatives

- [ext-list](https://npm.io/package/ext-list.md) — 6.3M weekly downloads
- [@lexical/selection](https://npm.io/package/@lexical/selection.md) — 3.8M weekly downloads
- [@lexical/text](https://npm.io/package/@lexical/text.md) — 3.6M weekly downloads
- [@lexical/clipboard](https://npm.io/package/@lexical/clipboard.md) — 3.0M weekly downloads
- [@tiptap/extension-mention](https://npm.io/package/@tiptap/extension-mention.md) — 3.0M weekly downloads

## Recent versions

- 1.0.5 (latest) — 2022-06-27
- 1.0.4 — 2022-06-27
- 1.0.3 — 2022-06-27
- 1.0.2 — 2022-06-26
- 1.0.1 — 2022-06-26
- 1.0.0 — 2022-06-26

## README

# Text Censor Package (textspace)
Censor your text with textspace package. It is a simple package to censor your text.
**Quick example**: latefrul@gmail.com => l******l@gmail.com
## Installation
```
npm install textspace
```
## Usage
```js

// Censor email address
const { emailCensor,censor } = require('textspace');

const emailCensorValue = emailCensor({email:'yourmail@gmail.com'})
// => Output = y******l@gmail.com

// Censor any text
const censorValue = censor({text:'emresengul',censorCharacter:'*'})
// => Output = e********l
```
## All Functions
| Functions         | Args                                     | Usage                                                            | Output                 |
| ----------------- | ---------------------------------------- | ---------------------------------------------------------------- | ---------------------- |
| emailCensor       | ```{email,censorCharacter,splitter}```   | ```emailCensor({email:'email@gmail.com'}) ```                    | ```e***l@gmail.com```  |
| randomCensor      | ```{text,size,censorCharacter}```        | ```randomCensor({text:'randomword',size:5}) ```                  | ```*an*om*o*d```       |
| censor            | ```{text,censorCharacter}```             | ```censor({text:'censor character'}) ```                         | ```c**************r``` |
| censorWithIndexes | ```{text,indexes,censorCharacter}```     | ```censorWithIndexes({text:'emre',indexes:[0,1]}) ```            | ```**re```             |
| censorDefinedText | ```{text,definedText,censorCharacter}``` | ```censorDefinedText({text:'emresengul',definedText:'emre'}) ``` | ```****sengul```       |




### Todo
- [ ] Write unit test
- [ ] Add new functions
	- [ ] Censor first N Character
	- [ ] Censor last N character

### In Progress
Nothing yet.


### Done ✓
- [x] Update README.md file
- [x] Add examples
- [x] Create documentation for package

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