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

profanity-util

Package Overview
Dependencies
Maintainers
1
Versions
9
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

profanity-util - npm Package Compare versions

Comparing version 0.0.0 to 0.0.1

6

lib/profanity.js
/*
Copyright (C) 2014 Kano Computing Ltd.
License: http://www.gnu.org/licenses/gpl-2.0.txt GNU General Public License v2
License: http://opensource.org/licenses/MIT The MIT License (MIT)
*/

@@ -24,3 +24,3 @@

function getListRegex (list) {
return new RegExp(list.join('|'), 'gi');
return new RegExp('\\b(' + list.join('|') + ')\\b', 'gi');
}

@@ -107,2 +107,2 @@

purify: purify
};
};
/*
Copyright (C) 2014 Kano Computing Ltd.
License: http://www.gnu.org/licenses/gpl-2.0.txt GNU General Public License v2
License: http://opensource.org/licenses/MIT The MIT License (MIT)
*/

@@ -37,2 +37,2 @@

eachRecursive: eachRecursive
};
};
{
"name": "profanity-util",
"version": "0.0.0",
"version": "0.0.1",
"description": "Utility for detection, filtering and replacement / obscuration of forbidden words",

@@ -5,0 +5,0 @@ "main": "lib/profanity.js",

@@ -5,2 +5,6 @@ # Node.js Profanity Utility

The original list of swearwords used by default was taken from [here](https://gist.github.com/jamiew/1112488).
**Please note:** This small utility module is written to prevent or monitor the use of certain words in your content without keeping context in account. An improper use may compromise the meaning of your content. Keep in account when using.
## Install

@@ -38,6 +42,6 @@

The .purify method will return an array containing two values:
The .purify method will return an Array containing two values:
* `[0]` The purified String / Object / Array
* `[1]` An Array containing all swearwords obscured / replaced
1. The purified String / Object / Array
2. An Array containing all swearwords obscured / replaced

@@ -106,2 +110,2 @@ **Arguments**

Copyright (C) 2014 Kano Computing Ltd. License: [http://www.gnu.org/licenses/gpl-2.0.txt](http://www.gnu.org/licenses/gpl-2.0.txt) GNU General Public License v2
Copyright (c) 2014 Kano Computing Ltd. - Released under The MIT License.
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