dirty-words

1.0.0 • Public • Published

Example

Install

$ npm install dirty-words

Create

// dont forget to add .default
const { dirtyWords } = require("dirty-words").default;
 
// ES2015+
import {dirtyWords} from "dirty-words"

Usage

replaces the chosen words in a string with five asterisks

const dirtyWords = require('dirty-words').default;
const filtered = dirtyWords('apple is selling a metal monitor stand for $999.99? that is really crazy!', ['metal', 'really']);
 
// apple is selling a ***** monitor for $999.99? that is ***** crazy!

Thanks!

Package Sidebar

Install

npm i dirty-words

Weekly Downloads

4

Version

1.0.0

License

ISC

Unpacked Size

2.04 kB

Total Files

4

Last publish

Collaborators

  • d1sco