🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more
Socket
Book a DemoInstallSign in
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

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.