Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

no-swears

Package Overview
Dependencies
Maintainers
1
Versions
10
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

no-swears

Filter swearwords out of your strings automagically

  • 1.0.0
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
6
decreased by-50%
Maintainers
1
Weekly downloads
 
Created
Source

no-swears

Automagically filter out swear words in strings

Very simple package for censoring swear words from JavaScript strings, replacing offending words with "****".

Usage

'use strict'

const noswear = require('no-swear')

filter()

This is the most basic filtering function, and requires the offending string and a callback, returning the cleaned up string to the program.

let badString = "this is a bitching string"

noswear.filter(badString, goodString => {
	console.log(goodString)
})

More options coming soon :)

Keywords

FAQs

Package last updated on 02 Jan 2018

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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc