New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@dragon-fish/words-filter

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@dragon-fish/words-filter

```bash yarn add @dragon-fish/words-filter ```

1.0.0
latest
npm
Version published
Weekly downloads
1
Maintainers
1
Weekly downloads
 
Created
Source

Words Filter

Install

yarn add @dragon-fish/words-filter

Quick try

yarn test This is bad words.

Usage

const Filter = require('./index')
var filter = Filter({
  list: [
    'bad\\s*words?',
    // Bad words list with RegExp
  ],
  cleanWith: '*', // Replace bad words with
})

var goodWorlds = 'This is good words.'
var badWords = 'This is bad words.'

console.log(filter.isBad(goodWorlds), filter.isBad(badWords)) // false, true
console.log(filter.clean(badWords)) // This is *********.

FAQs

Package last updated on 18 Dec 2020

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts