1.0.5 • Published 2 years ago

textspace v1.0.5

Weekly downloads
-
License
ISC
Repository
github
Last release
2 years ago

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

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

FunctionsArgsUsageOutput
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 ✓

  • Update README.md file
  • Add examples
  • Create documentation for package
1.0.5

2 years ago

1.0.4

2 years ago

1.0.3

2 years ago

1.0.2

2 years ago

1.0.1

2 years ago

1.0.0

2 years ago