sprhackz-censorify
v1.0.0
Published
Efficiently censor text with default and custom words. Utilizes sets, regex, and modular exports for scalability.
Downloads
3
Readme
CustomCensorify
A JavaScript module for efficient text censorship. Replace sensitive words with asterisks in an easy and effective manner.
Installation
npm install spr-censorify
Usage
// To Install package `npm i spr_censorify`
var censor = require("spr_censorify"); // To Import The Package
console.log("\n PreDefine Censored Words : ");
console.log(censor.getCensoredWords());
// Censor a sample text
console.log(`\n ${censor.censor("Some very sad, bad and mad text.")}`);
// Add a custom censored word
console.log("\n To Add a Custom Censored Word :");
censor.addCensoredWord("gloomy");
// Output the updated list of censored words
console.log(censor.getCensoredWords());
// Censor another sample text
console.log(`\n ${censor.censor("A very gloomy day.")} \n`);
Authors
- Selvin PaulRaj k - Initial work - SPR Hackz