diff --git a/backend.js b/backend.js index 6cf3a73..552cd16 100644 --- a/backend.js +++ b/backend.js @@ -11,7 +11,10 @@ const io = new Server(server, { pingTimeout:5000 }) -app.use(requireHTTPS); +var Filter = require('bad-words') +filter = new Filter(); + +app.use(requireHTTPS); // Set 'SET NODE_ENV=development' in local computer before use function requireHTTPS(req, res, next) { // The 'x-forwarded-proto' check is for Heroku @@ -68,7 +71,7 @@ io.on('connection', (socket)=>{ socket.on('message',(message)=>{ let timeoutId; clearTimeout(bPlayers[socket.id].timeoutId); - bPlayers[socket.id].message = message + bPlayers[socket.id].message = filter.clean(message) function startTimer() { timeoutId = setTimeout(() => { diff --git a/node_modules/.package-lock.json b/node_modules/.package-lock.json index 8f43bdc..3b6bbba 100644 --- a/node_modules/.package-lock.json +++ b/node_modules/.package-lock.json @@ -43,6 +43,22 @@ "resolved": "https://registry.npmjs.org/array-flatten/-/array-flatten-1.1.1.tgz", "integrity": "sha512-PCVAQswWemu6UdxsDFFX/+gVeYqKAod3D3UVm91jHwynguOwAvYPhx8nNlM++NqRcK6CxxpUafjmhIdKiHibqg==" }, + "node_modules/bad-words": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/bad-words/-/bad-words-3.0.4.tgz", + "integrity": "sha512-v/Q9uRPH4+yzDVLL4vR1+S9KoFgOEUl5s4axd6NIAq8SV2mradgi4E8lma/Y0cw1ltVdvyegCQQKffCPRCp8fg==", + "dependencies": { + "badwords-list": "^1.0.0" + }, + "engines": { + "node": ">=8.0.0" + } + }, + "node_modules/badwords-list": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/badwords-list/-/badwords-list-1.0.0.tgz", + "integrity": "sha512-oWhaSG67e+HQj3OGHQt2ucP+vAPm1wTbdp2aDHeuh4xlGXBdWwzZ//pfu6swf5gZ8iX0b7JgmSo8BhgybbqszA==" + }, "node_modules/base64id": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/base64id/-/base64id-2.0.0.tgz", diff --git a/node_modules/bad-words/.travis.yml b/node_modules/bad-words/.travis.yml new file mode 100644 index 0000000..3d4b9a5 --- /dev/null +++ b/node_modules/bad-words/.travis.yml @@ -0,0 +1,4 @@ +language: node_js +node_js: + - "8" +script: npm test \ No newline at end of file diff --git a/node_modules/bad-words/CHANGELOG.md b/node_modules/bad-words/CHANGELOG.md new file mode 100644 index 0000000..bea8ff1 --- /dev/null +++ b/node_modules/bad-words/CHANGELOG.md @@ -0,0 +1,123 @@ +# Changelog + +All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines. + +### [3.0.4](https://github.com/web-mech/badwords/compare/v3.0.3...v3.0.4) (2020-11-16) + + +## [3.0.3](https://github.com/web-mech/badwords/compare/v3.0.2...v3.0.3) (2019-07-25) + + + + +## [3.0.2](https://github.com/web-mech/badwords/compare/v3.0.1...v3.0.2) (2019-03-14) + + +### Bug Fixes + +* **lang.json:** remove gay from badwords ([88d1aed](https://github.com/web-mech/badwords/commit/88d1aed)) + + + + +## [3.0.1](https://github.com/web-mech/badwords/compare/v3.0.0...v3.0.1) (2019-02-19) + + +### Bug Fixes + +* update removeWords functionality to be case-insensitive ([235121d](https://github.com/web-mech/badwords/commit/235121d)) + + + + +# [3.0.0](https://github.com/web-mech/badwords/compare/v2.0.0...v3.0.0) (2018-10-23) + + +### Code Refactoring + +* utilize es6 spread in addWords/removeWords ([656b87c](https://github.com/web-mech/badwords/commit/656b87c)) + + +### BREAKING CHANGES + +* changes the way addWords is used, no longer accepts a single array as a parameter unless used with the spread operator + + + + +# [2.0.0](https://github.com/web-mech/badwords/compare/v1.6.5...v2.0.0) (2018-10-23) + + +### Documentation + +* update documentation. add requirements for using lib moving forward ([9b2831d](https://github.com/web-mech/badwords/commit/9b2831d)) + + +### Features + +* **profane:** support profane phrases and well as words ([995ea1e](https://github.com/web-mech/badwords/commit/995ea1e)) + + +### BREAKING CHANGES + +* moving into es2016+ language features + + + + +## [1.6.5](https://github.com/web-mech/badwords/compare/v1.6.4...v1.6.5) (2018-10-23) + + + + +## [1.6.4](https://github.com/web-mech/badwords/compare/v1.6.3...v1.6.4) (2018-09-21) + + +### Bug Fixes + +* **isProfane:** Adding regex word boundary for isProfane ([3908f3c](https://github.com/web-mech/badwords/commit/3908f3c)) + + + + +## [1.6.3](https://github.com/web-mech/badwords/compare/v1.6.2...v1.6.3) (2018-08-02) + + + + +## [1.6.2](https://github.com/web-mech/badwords/compare/v1.6.1...v1.6.2) (2018-08-02) + + +### Bug Fixes + +* **isProfaneLike:** abort trying to match every instance of profane words. ([31126d6](https://github.com/web-mech/badwords/commit/31126d6)) + + + + +## [1.6.1](https://github.com/web-mech/badwords/compare/v1.6.0...v1.6.1) (2017-10-25) + + +### Bug Fixes + +* **isProfaneLike:** fix case sensitive checks within list ([bfa05ce](https://github.com/web-mech/badwords/commit/bfa05ce)) + + + + +# [1.6.0](https://github.com/web-mech/badwords/compare/v1.5.2...v1.6.0) (2017-10-16) + + +### Features + +* fixes and updates ([8049222](https://github.com/web-mech/badwords/commit/8049222)) + + + + +## [1.5.2](https://github.com/web-mech/badwords/compare/v1.5.1...v1.5.2) (2017-10-16) + + +### Bug Fixes + +* support for better filtering ([7c8d0e2](https://github.com/web-mech/badwords/commit/7c8d0e2)) diff --git a/node_modules/bad-words/LICENSE b/node_modules/bad-words/LICENSE new file mode 100644 index 0000000..da6e7d2 --- /dev/null +++ b/node_modules/bad-words/LICENSE @@ -0,0 +1,20 @@ +The MIT License (MIT) + +Copyright (c) 2015 Michael Price + +Permission is hereby granted, free of charge, to any person obtaining a copy of +this software and associated documentation files (the "Software"), to deal in +the Software without restriction, including without limitation the rights to +use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of +the Software, and to permit persons to whom the Software is furnished to do so, +subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS +FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR +COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER +IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/node_modules/bad-words/Makefile b/node_modules/bad-words/Makefile new file mode 100644 index 0000000..3f8a1d5 --- /dev/null +++ b/node_modules/bad-words/Makefile @@ -0,0 +1,4 @@ +test: + @./node_modules/mocha/bin/_mocha -R $(REPORTER) + +.PHONY: test \ No newline at end of file diff --git a/node_modules/bad-words/README.md b/node_modules/bad-words/README.md new file mode 100644 index 0000000..13a0a1e --- /dev/null +++ b/node_modules/bad-words/README.md @@ -0,0 +1,175 @@ +# bad-words + +A javascript filter for badwords + +[![Build Status](https://travis-ci.org/web-mech/badwords.svg?branch=master)](https://travis-ci.org/web-mech/badwords) +[![Commitizen friendly](https://img.shields.io/badge/commitizen-friendly-brightgreen.svg)](http://commitizen.github.io/cz-cli/) +[![semantic-release](https://img.shields.io/badge/%20%20%F0%9F%93%A6%F0%9F%9A%80-semantic--release-e10079.svg?style=flat-square)](https://github.com/semantic-release/semantic-release) + +## Requirements + +As of version 2, requires you either have an environment that understands ES2016 and beyond or a transpiler like Babel. + +## Installation + + npm install bad-words --save + +## Usage + +```js +var Filter = require('bad-words'), + filter = new Filter(); + +console.log(filter.clean("Don't be an ash0le")); //Don't be an ****** +``` + +### Placeholder Overrides + +```js +var Filter = require('bad-words'); +var customFilter = new Filter({ placeHolder: 'x'}); + +customFilter.clean("Don't be an ash0le"); //Don't be an xxxxxx +``` + +### Regex Overrides + +```js +var filter = new Filter({ regex: /\*|\.|$/gi }); + +var filter = new Filter({ replaceRegex: /[A-Za-z0-9가-힣_]/g }); +//multilingual support for word filtering +``` + +### Add words to the blacklist + +```js +var filter = new Filter(); + +filter.addWords('some', 'bad', 'word'); + +filter.clean("some bad word!") //**** *** ****! + +//or use an array using the spread operator + +var newBadWords = ['some', 'bad', 'word']; + +filter.addWords(...newBadWords); + +filter.clean("some bad word!") //**** *** ****! + +//or + +var filter = new Filter({ list: ['some', 'bad', 'word'] }); + +filter.clean("some bad word!") //**** *** ****! +``` + +### Instantiate with an empty list + +```js +var filter = new Filter({ emptyList: true }); +filter.clean('hell this wont clean anything'); //hell this wont clean anything +``` + +### Remove words from the blacklist + +```js +let filter = new Filter(); + +filter.removeWords('hells', 'sadist'); + +filter.clean("some hells word!"); //some hells word! + +//or use an array using the spread operator + +let removeWords = ['hells', 'sadist']; + +filter.removeWords(...removeWords); + +filter.clean("some sadist hells word!"); //some sadist hells word! +``` + +### API + + + +#### constructor + +Filter constructor. + +**Parameters** + +- `options` **[object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object)** Filter instance options (optional, default `{}`) + - `options.emptyList` **[boolean](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Boolean)** Instantiate filter with no blacklist + - `options.list` **[array](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array)** Instantiate filter with custom list + - `options.placeHolder` **[string](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String)** Character used to replace profane words. + - `options.regex` **[string](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String)** Regular expression used to sanitize words before comparing them to blacklist. + - `options.replaceRegex` **[string](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String)** Regular expression used to replace profane words with placeHolder. + +#### isProfane + +Determine if a string contains profane language. + +**Parameters** + +- `string` **[string](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String)** String to evaluate for profanity. + +#### replaceWord + +Replace a word with placeHolder characters; + +**Parameters** + +- `string` **[string](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String)** String to replace. + +#### clean + +Evaluate a string for profanity and return an edited version. + +**Parameters** + +- `string` **[string](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String)** Sentence to filter. + +#### addWords + +Add word(s) to blacklist filter / remove words from whitelist filter + +**Parameters** + +- `word` **...[string](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String)** Word(s) to add to blacklist + +#### removeWords + +Add words to whitelist filter + +**Parameters** + +- `word` **...[string](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String)** Word(s) to add to whitelist. + +## Testing + + npm test + +## License + +The MIT License (MIT) + +Copyright (c) 2013 Michael Price + +Permission is hereby granted, free of charge, to any person obtaining a copy of +this software and associated documentation files (the "Software"), to deal in +the Software without restriction, including without limitation the rights to +use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of +the Software, and to permit persons to whom the Software is furnished to do so, +subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS +FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR +COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER +IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/node_modules/bad-words/lib/badwords.js b/node_modules/bad-words/lib/badwords.js new file mode 100644 index 0000000..3990c41 --- /dev/null +++ b/node_modules/bad-words/lib/badwords.js @@ -0,0 +1,88 @@ +const localList = require('./lang.json').words; +const baseList = require('badwords-list').array; + +class Filter { + + /** + * Filter constructor. + * @constructor + * @param {object} options - Filter instance options + * @param {boolean} options.emptyList - Instantiate filter with no blacklist + * @param {array} options.list - Instantiate filter with custom list + * @param {string} options.placeHolder - Character used to replace profane words. + * @param {string} options.regex - Regular expression used to sanitize words before comparing them to blacklist. + * @param {string} options.replaceRegex - Regular expression used to replace profane words with placeHolder. + * @param {string} options.splitRegex - Regular expression used to split a string into words. + */ + constructor(options = {}) { + Object.assign(this, { + list: options.emptyList && [] || Array.prototype.concat.apply(localList, [baseList, options.list || []]), + exclude: options.exclude || [], + splitRegex: options.splitRegex || /\b/, + placeHolder: options.placeHolder || '*', + regex: options.regex || /[^a-zA-Z0-9|\$|\@]|\^/g, + replaceRegex: options.replaceRegex || /\w/g + }) + } + + /** + * Determine if a string contains profane language. + * @param {string} string - String to evaluate for profanity. + */ + isProfane(string) { + return this.list + .filter((word) => { + const wordExp = new RegExp(`\\b${word.replace(/(\W)/g, '\\$1')}\\b`, 'gi'); + return !this.exclude.includes(word.toLowerCase()) && wordExp.test(string); + }) + .length > 0 || false; + } + + /** + * Replace a word with placeHolder characters; + * @param {string} string - String to replace. + */ + replaceWord(string) { + return string + .replace(this.regex, '') + .replace(this.replaceRegex, this.placeHolder); + } + + /** + * Evaluate a string for profanity and return an edited version. + * @param {string} string - Sentence to filter. + */ + clean(string) { + return string.split(this.splitRegex).map((word) => { + return this.isProfane(word) ? this.replaceWord(word) : word; + }).join(this.splitRegex.exec(string)[0]); + } + + /** + * Add word(s) to blacklist filter / remove words from whitelist filter + * @param {...string} word - Word(s) to add to blacklist + */ + addWords() { + let words = Array.from(arguments); + + this.list.push(...words); + + words + .map(word => word.toLowerCase()) + .forEach((word) => { + if (this.exclude.includes(word)) { + this.exclude.splice(this.exclude.indexOf(word), 1); + } + }); + } + + /** + * Add words to whitelist filter + * @param {...string} word - Word(s) to add to whitelist. + */ + removeWords() { + this.exclude.push(...Array.from(arguments).map(word => word.toLowerCase())); + } +} + +module.exports = Filter; \ No newline at end of file diff --git a/node_modules/bad-words/lib/lang.json b/node_modules/bad-words/lib/lang.json new file mode 100644 index 0000000..a417685 --- /dev/null +++ b/node_modules/bad-words/lib/lang.json @@ -0,0 +1,451 @@ +{ + "words":[ + "ahole", + "anus", + "ash0le", + "ash0les", + "asholes", + "ass", + "Ass Monkey", + "Assface", + "assh0le", + "assh0lez", + "asshole", + "assholes", + "assholz", + "asswipe", + "azzhole", + "bassterds", + "bastard", + "bastards", + "bastardz", + "basterds", + "basterdz", + "Biatch", + "bitch", + "bitches", + "Blow Job", + "boffing", + "butthole", + "buttwipe", + "c0ck", + "c0cks", + "c0k", + "Carpet Muncher", + "cawk", + "cawks", + "Clit", + "cnts", + "cntz", + "cock", + "cockhead", + "cock-head", + "cocks", + "CockSucker", + "cock-sucker", + "crap", + "cum", + "cunt", + "cunts", + "cuntz", + "dick", + "dild0", + "dild0s", + "dildo", + "dildos", + "dilld0", + "dilld0s", + "dominatricks", + "dominatrics", + "dominatrix", + "dyke", + "enema", + "f u c k", + "f u c k e r", + "fag", + "fag1t", + "faget", + "fagg1t", + "faggit", + "faggot", + "fagg0t", + "fagit", + "fags", + "fagz", + "faig", + "faigs", + "fart", + "flipping the bird", + "fuck", + "fucker", + "fuckin", + "fucking", + "fucks", + "Fudge Packer", + "fuk", + "Fukah", + "Fuken", + "fuker", + "Fukin", + "Fukk", + "Fukkah", + "Fukken", + "Fukker", + "Fukkin", + "g00k", + "God-damned", + "h00r", + "h0ar", + "h0re", + "hells", + "hoar", + "hoor", + "hoore", + "jackoff", + "jap", + "japs", + "jerk-off", + "jisim", + "jiss", + "jizm", + "jizz", + "knob", + "knobs", + "knobz", + "kunt", + "kunts", + "kuntz", + "Lezzian", + "Lipshits", + "Lipshitz", + "masochist", + "masokist", + "massterbait", + "masstrbait", + "masstrbate", + "masterbaiter", + "masterbate", + "masterbates", + "Motha Fucker", + "Motha Fuker", + "Motha Fukkah", + "Motha Fukker", + "Mother Fucker", + "Mother Fukah", + "Mother Fuker", + "Mother Fukkah", + "Mother Fukker", + "mother-fucker", + "Mutha Fucker", + "Mutha Fukah", + "Mutha Fuker", + "Mutha Fukkah", + "Mutha Fukker", + "n1gr", + "nastt", + "nigger;", + "nigur;", + "niiger;", + "niigr;", + "orafis", + "orgasim;", + "orgasm", + "orgasum", + "oriface", + "orifice", + "orifiss", + "packi", + "packie", + "packy", + "paki", + "pakie", + "paky", + "pecker", + "peeenus", + "peeenusss", + "peenus", + "peinus", + "pen1s", + "penas", + "penis", + "penis-breath", + "penus", + "penuus", + "Phuc", + "Phuck", + "Phuk", + "Phuker", + "Phukker", + "polac", + "polack", + "polak", + "Poonani", + "pr1c", + "pr1ck", + "pr1k", + "pusse", + "pussee", + "pussy", + "puuke", + "puuker", + "qweir", + "recktum", + "rectum", + "retard", + "sadist", + "scank", + "schlong", + "screwing", + "semen", + "sex", + "sexy", + "Sh!t", + "sh1t", + "sh1ter", + "sh1ts", + "sh1tter", + "sh1tz", + "shit", + "shits", + "shitter", + "Shitty", + "Shity", + "shitz", + "Shyt", + "Shyte", + "Shytty", + "Shyty", + "skanck", + "skank", + "skankee", + "skankey", + "skanks", + "Skanky", + "slag", + "slut", + "sluts", + "Slutty", + "slutz", + "son-of-a-bitch", + "tit", + "turd", + "va1jina", + "vag1na", + "vagiina", + "vagina", + "vaj1na", + "vajina", + "vullva", + "vulva", + "w0p", + "wh00r", + "wh0re", + "whore", + "xrated", + "xxx", + "b!+ch", + "bitch", + "blowjob", + "clit", + "arschloch", + "fuck", + "shit", + "ass", + "asshole", + "b!tch", + "b17ch", + "b1tch", + "bastard", + "bi+ch", + "boiolas", + "buceta", + "c0ck", + "cawk", + "chink", + "cipa", + "clits", + "cock", + "cum", + "cunt", + "dildo", + "dirsa", + "ejakulate", + "fatass", + "fcuk", + "fuk", + "fux0r", + "hoer", + "hore", + "jism", + "kawk", + "l3itch", + "l3i+ch", + "masturbate", + "masterbat*", + "masterbat3", + "motherfucker", + "s.o.b.", + "mofo", + "nazi", + "nigga", + "nigger", + "nutsack", + "phuck", + "pimpis", + "pusse", + "pussy", + "scrotum", + "sh!t", + "shemale", + "shi+", + "sh!+", + "slut", + "smut", + "teets", + "tits", + "boobs", + "b00bs", + "teez", + "testical", + "testicle", + "titt", + "w00se", + "jackoff", + "wank", + "whoar", + "whore", + "*damn", + "*dyke", + "*fuck*", + "*shit*", + "@$$", + "amcik", + "andskota", + "arse*", + "assrammer", + "ayir", + "bi7ch", + "bitch*", + "bollock*", + "breasts", + "butt-pirate", + "cabron", + "cazzo", + "chraa", + "chuj", + "Cock*", + "cunt*", + "d4mn", + "daygo", + "dego", + "dick*", + "dike*", + "dupa", + "dziwka", + "ejackulate", + "Ekrem*", + "Ekto", + "enculer", + "faen", + "fag*", + "fanculo", + "fanny", + "feces", + "feg", + "Felcher", + "ficken", + "fitt*", + "Flikker", + "foreskin", + "Fotze", + "Fu(*", + "fuk*", + "futkretzn", + "gook", + "guiena", + "h0r", + "h4x0r", + "hell", + "helvete", + "hoer*", + "honkey", + "Huevon", + "hui", + "injun", + "jizz", + "kanker*", + "kike", + "klootzak", + "kraut", + "knulle", + "kuk", + "kuksuger", + "Kurac", + "kurwa", + "kusi*", + "kyrpa*", + "lesbo", + "mamhoon", + "masturbat*", + "merd*", + "mibun", + "monkleigh", + "mouliewop", + "muie", + "mulkku", + "muschi", + "nazis", + "nepesaurio", + "nigger*", + "orospu", + "paska*", + "perse", + "picka", + "pierdol*", + "pillu*", + "pimmel", + "piss*", + "pizda", + "poontsee", + "poop", + "porn", + "p0rn", + "pr0n", + "preteen", + "pula", + "pule", + "puta", + "puto", + "qahbeh", + "queef*", + "rautenberg", + "schaffer", + "scheiss*", + "schlampe", + "schmuck", + "screw", + "sh!t*", + "sharmuta", + "sharmute", + "shipal", + "shiz", + "skribz", + "skurwysyn", + "sphencter", + "spic", + "spierdalaj", + "splooge", + "suka", + "b00b*", + "testicle*", + "titt*", + "twat", + "vittu", + "wank*", + "wetback*", + "wichser", + "wop*", + "yed", + "zabourah" + ] +} diff --git a/node_modules/bad-words/package.json b/node_modules/bad-words/package.json new file mode 100644 index 0000000..a577e07 --- /dev/null +++ b/node_modules/bad-words/package.json @@ -0,0 +1,36 @@ +{ + "name": "bad-words", + "version": "3.0.4", + "description": "A javascript filter for bad words", + "main": "./lib/badwords", + "directories": { + "test": "test" + }, + "scripts": { + "test": "./node_modules/.bin/mocha -R spec", + "docs": "./node_modules/.bin/documentation readme --section API ./lib/badwords.js" + }, + "repository": { + "type": "git", + "url": "git://github.com/web-mech/badwords.git" + }, + "keywords": [ + "curse", + "words", + "profanity", + "filter" + ], + "dependencies": { + "badwords-list": "^1.0.0" + }, + "devDependencies": { + "better-assert": "1.0.0", + "documentation": "^5.3.3", + "mocha": "^5.2.0" + }, + "author": "Mike P.", + "license": "MIT", + "engines": { + "node": ">=8.0.0" + } +} diff --git a/node_modules/bad-words/test/addWords.js b/node_modules/bad-words/test/addWords.js new file mode 100644 index 0000000..8267de8 --- /dev/null +++ b/node_modules/bad-words/test/addWords.js @@ -0,0 +1,28 @@ +require('assert'); +var Filter = require('../lib/badwords.js'), + filter = new Filter(), + assert = require('better-assert'); + +describe('filter', function(){ + describe('addWords',function(){ + it('Should append words to the filter list.', function(){ + filter.addWords('dog', 'go'); + assert(filter.clean('Go dog go') === '** *** **'); + }); + + it('Should append words to the filter using an array', () => { + let addWords = ['go', 'dog']; + filter = new Filter() + filter.addWords(...addWords); + assert(filter.clean('Go dog go') === '** *** **'); + }); + + it('Should allow a list to be passed to the constructor', function() { + filter = new Filter({ + list: ['dog'] + }); + + assert(filter.clean('Go dog go') === 'Go *** go'); + }); + }); +}); \ No newline at end of file diff --git a/node_modules/bad-words/test/filter.js b/node_modules/bad-words/test/filter.js new file mode 100644 index 0000000..813d86d --- /dev/null +++ b/node_modules/bad-words/test/filter.js @@ -0,0 +1,47 @@ +require('assert'); +var Filter = require('../lib/badwords.js'), + filter = new Filter(), + assert = require('better-assert'); + +describe('filter', function(){ + describe('clean',function(){ + it('Should replace a bad word within a sentence asterisks (******)',function(){ + console.log(filter.clean('Don\'t be an ash0le')); + assert(filter.clean('Don\'t be an ash0le') === 'Don\'t be an ******'); + + }); + + it('Should replace multiple instances of any bad words within a sentence asterisks (******)',function(){ + assert(filter.clean('cnts ash0le knob xxx') === '**** ****** **** ***'); + }); + + it('Should not replace anything within a sentence if there are no bad words',function(){ + assert(filter.clean('The cat ran fast') === 'The cat ran fast'); + }); + + it('Should replace a string with proper placeholder when overridden', function(){ + var customFilter = new Filter({ placeHolder: 'x'}); + assert(customFilter.clean('This is a hells good test') === 'This is a xxxxx good test'); + }); + + it('Should allow an instance of filter with an empty blacklist', function() { + var customFilter = new Filter({ + emptyList: true + }); + assert(customFilter.clean('This is a hells good test') === 'This is a hells good test'); + }); + + it('Should tokenize words according to regex word boundaries',function(){ + assert(filter.clean('what a bitch...fuck you') === 'what a *****...**** you'); + assert(filter.clean('
Don\'t be an asshole
') === 'Don\'t be an *******
'); + }); + + xit('Should filter words that are derivatives of words from the filter blacklist', function() { + assert(filter.clean('shitshit') === '********'); + }); + + it('Shouldn\'t filter words that aren\'t profane.', function() { + assert(filter.clean('hello there') === 'hello there'); + }); + }); +}); \ No newline at end of file diff --git a/node_modules/bad-words/test/isProfane.js b/node_modules/bad-words/test/isProfane.js new file mode 100644 index 0000000..208b961 --- /dev/null +++ b/node_modules/bad-words/test/isProfane.js @@ -0,0 +1,44 @@ +require('assert'); +var Filter = require('../lib/badwords.js'), + filter = new Filter(), + assert = require('better-assert'); + +describe('filter', function(){ + describe('isProfane',function(){ + it("Should detect a bad word and return a boolean value",function(){ + assert(filter.isProfane("ash0le")); + }); + + it("Should return false when no bad word is detected",function(){ + assert(filter.isProfane("wife") === false); + }); + + it("Should be able to detect a bad word in a sentence",function(){ + assert(filter.isProfane("that person is an ash0le")); + }); + + it('Filters out special characters appropriately', function() { + assert(filter.isProfane("You're an asshole^ you are")); + }); + + it('Should detect filtered words from badwords-list', function(){ + assert(filter.isProfane('willies')); + }); + + it('Should detect filtered words regardless of type case', function() { + var filter = new Filter({ + list: ['Test'] + }); + assert(filter.isProfane('test')); + }); + + it('Should tokenize words according to regex word boundaries', function() { + assert(filter.isProfane("that person is an\nasshole")); + }); + + it('Should detect bad word phrases', function () { + filter.addWords('oh no'); + assert(filter.isProfane("oh no! this is profane!")); + }); + }); +}); diff --git a/node_modules/bad-words/test/options.js b/node_modules/bad-words/test/options.js new file mode 100644 index 0000000..cada98f --- /dev/null +++ b/node_modules/bad-words/test/options.js @@ -0,0 +1,24 @@ +require('assert'); +var Filter = require('../lib/badwords.js'), +assert = require('better-assert'); + +describe('options', function() { + describe('split regex', function() { + + it('default value', function() { + filter = new Filter(); + filter.addWords('français'); + assert(filter.clean('fucking asshole') == '******* *******'); + assert(filter.clean('mot en français') == 'mot en français'); + }); + + it('override value', function() { + filter = new Filter({splitRegex: / /}); + filter.addWords('français'); + assert(filter.clean('fucking asshole') == '******* *******'); + assert(filter.clean('mot en français') == 'mot en *******'); + }); + + + }); +}); diff --git a/node_modules/bad-words/test/removeWords.js b/node_modules/bad-words/test/removeWords.js new file mode 100644 index 0000000..e21220c --- /dev/null +++ b/node_modules/bad-words/test/removeWords.js @@ -0,0 +1,21 @@ +require('assert'); +var Filter = require('../lib/badwords.js'), + filter = new Filter(), + assert = require('better-assert'); + +describe('filter', () => { + describe('removeWords',() => { + it('Should allow you to remove words from the filter blacklist and no longer filter them (case-insensitive)', () => { + filter.removeWords('Hells'); + assert(filter.clean('This is a hells good test') === 'This is a hells good test'); + }); + + it ('Should allow you to remove an array of words from the filter blacklist and no longer filter them', () => { + let removingWords = ['hells', 'sadist']; + + filter = new Filter(); + filter.removeWords(...removingWords); + assert(filter.clean('This is a hells sadist test') === 'This is a hells sadist test'); + }); + }); +}); \ No newline at end of file diff --git a/node_modules/bad-words/test/replaceWord.js b/node_modules/bad-words/test/replaceWord.js new file mode 100644 index 0000000..00874d6 --- /dev/null +++ b/node_modules/bad-words/test/replaceWord.js @@ -0,0 +1,12 @@ +require('assert'); +var Filter = require('../lib/badwords.js'), + filter = new Filter(), + assert = require('better-assert'); + +describe('filter', function(){ + describe('replaceWord',function(){ + it("Should replace a bad word with asterisks (******)",function(){ + assert(filter.replaceWord("ash0le") == '******'); + }); + }); +}); \ No newline at end of file diff --git a/node_modules/badwords-list/.npmignore b/node_modules/badwords-list/.npmignore new file mode 100644 index 0000000..278d773 --- /dev/null +++ b/node_modules/badwords-list/.npmignore @@ -0,0 +1,15 @@ +lib-cov +*.seed +*.log +*.csv +*.dat +*.out +*.pid +*.gz + +pids +logs +results + +npm-debug.log +node_modules/ \ No newline at end of file diff --git a/node_modules/badwords-list/LICENSE b/node_modules/badwords-list/LICENSE new file mode 100644 index 0000000..8ce8431 --- /dev/null +++ b/node_modules/badwords-list/LICENSE @@ -0,0 +1,20 @@ +The MIT License (MIT) + +Copyright (c) 2013 Maurice Butler + +Permission is hereby granted, free of charge, to any person obtaining a copy of +this software and associated documentation files (the "Software"), to deal in +the Software without restriction, including without limitation the rights to +use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of +the Software, and to permit persons to whom the Software is furnished to do so, +subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS +FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR +COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER +IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/node_modules/badwords-list/Makefile b/node_modules/badwords-list/Makefile new file mode 100644 index 0000000..3f8a1d5 --- /dev/null +++ b/node_modules/badwords-list/Makefile @@ -0,0 +1,4 @@ +test: + @./node_modules/mocha/bin/_mocha -R $(REPORTER) + +.PHONY: test \ No newline at end of file diff --git a/node_modules/badwords-list/README.md b/node_modules/badwords-list/README.md new file mode 100644 index 0000000..1b4ae85 --- /dev/null +++ b/node_modules/badwords-list/README.md @@ -0,0 +1,57 @@ +badwords-list v1.0.0 +======== + +A highly consumable list of bad (profanity) english words based on the nice short and simple list found in [Google's "what do you love" project](http://www.wdyl.com/) made accessable by [Jamie Wilkinson](https://gist.github.com/jamiew) [here](https://gist.github.com/jamiew/1112488) + +Inspired by [badwords](https://github.com/MauriceButler/badwords) + +This data has been exposed as an object that contains + + - an array + - an object + - a regular expression + +depending on what is required for your purposes. + + +Install +======= + + npm install badwords-list + +Usage +===== + +``` +var list = require('badwords-list'), + array = list.array, + object = list.object, + regex = list.regex; +``` + +Testing +======= + +####Requires +- Mocha +- better-assert + + +``` +npm test +``` + +**or** + +``` +REPORTER=spec make +``` + +**or** + +``` +mocha +``` + + + diff --git a/node_modules/badwords-list/lib/array.js b/node_modules/badwords-list/lib/array.js new file mode 100644 index 0000000..267a521 --- /dev/null +++ b/node_modules/badwords-list/lib/array.js @@ -0,0 +1 @@ +module.exports = ["4r5e", "5h1t", "5hit", "a55", "anal", "anus", "ar5e", "arrse", "arse", "ass", "ass-fucker", "asses", "assfucker", "assfukka", "asshole", "assholes", "asswhole", "a_s_s", "b!tch", "b00bs", "b17ch", "b1tch", "ballbag", "balls", "ballsack", "bastard", "beastial", "beastiality", "bellend", "bestial", "bestiality", "bi+ch", "biatch", "bitch", "bitcher", "bitchers", "bitches", "bitchin", "bitching", "bloody", "blow job", "blowjob", "blowjobs", "boiolas", "bollock", "bollok", "boner", "boob", "boobs", "booobs", "boooobs", "booooobs", "booooooobs", "breasts", "buceta", "bugger", "bum", "bunny fucker", "butt", "butthole", "buttmuch", "buttplug", "c0ck", "c0cksucker", "carpet muncher", "cawk", "chink", "cipa", "cl1t", "clit", "clitoris", "clits", "cnut", "cock", "cock-sucker", "cockface", "cockhead", "cockmunch", "cockmuncher", "cocks", "cocksuck", "cocksucked", "cocksucker", "cocksucking", "cocksucks", "cocksuka", "cocksukka", "cok", "cokmuncher", "coksucka", "coon", "cox", "crap", "cum", "cummer", "cumming", "cums", "cumshot", "cunilingus", "cunillingus", "cunnilingus", "cunt", "cuntlick", "cuntlicker", "cuntlicking", "cunts", "cyalis", "cyberfuc", "cyberfuck", "cyberfucked", "cyberfucker", "cyberfuckers", "cyberfucking", "d1ck", "damn", "dick", "dickhead", "dildo", "dildos", "dink", "dinks", "dirsa", "dlck", "dog-fucker", "doggin", "dogging", "donkeyribber", "doosh", "duche", "dyke", "ejaculate", "ejaculated", "ejaculates", "ejaculating", "ejaculatings", "ejaculation", "ejakulate", "f u c k", "f u c k e r", "f4nny", "fag", "fagging", "faggitt", "faggot", "faggs", "fagot", "fagots", "fags", "fanny", "fannyflaps", "fannyfucker", "fanyy", "fatass", "fcuk", "fcuker", "fcuking", "feck", "fecker", "felching", "fellate", "fellatio", "fingerfuck", "fingerfucked", "fingerfucker", "fingerfuckers", "fingerfucking", "fingerfucks", "fistfuck", "fistfucked", "fistfucker", "fistfuckers", "fistfucking", "fistfuckings", "fistfucks", "flange", "fook", "fooker", "fuck", "fucka", "fucked", "fucker", "fuckers", "fuckhead", "fuckheads", "fuckin", "fucking", "fuckings", "fuckingshitmotherfucker", "fuckme", "fucks", "fuckwhit", "fuckwit", "fudge packer", "fudgepacker", "fuk", "fuker", "fukker", "fukkin", "fuks", "fukwhit", "fukwit", "fux", "fux0r", "f_u_c_k", "gangbang", "gangbanged", "gangbangs", "gaylord", "gaysex", "goatse", "God", "god-dam", "god-damned", "goddamn", "goddamned", "hardcoresex", "hell", "heshe", "hoar", "hoare", "hoer", "homo", "hore", "horniest", "horny", "hotsex", "jack-off", "jackoff", "jap", "jerk-off", "jism", "jiz", "jizm", "jizz", "kawk", "knob", "knobead", "knobed", "knobend", "knobhead", "knobjocky", "knobjokey", "kock", "kondum", "kondums", "kum", "kummer", "kumming", "kums", "kunilingus", "l3i+ch", "l3itch", "labia", "lust", "lusting", "m0f0", "m0fo", "m45terbate", "ma5terb8", "ma5terbate", "masochist", "master-bate", "masterb8", "masterbat*", "masterbat3", "masterbate", "masterbation", "masterbations", "masturbate", "mo-fo", "mof0", "mofo", "mothafuck", "mothafucka", "mothafuckas", "mothafuckaz", "mothafucked", "mothafucker", "mothafuckers", "mothafuckin", "mothafucking", "mothafuckings", "mothafucks", "mother fucker", "motherfuck", "motherfucked", "motherfucker", "motherfuckers", "motherfuckin", "motherfucking", "motherfuckings", "motherfuckka", "motherfucks", "muff", "mutha", "muthafecker", "muthafuckker", "muther", "mutherfucker", "n1gga", "n1gger", "nazi", "nigg3r", "nigg4h", "nigga", "niggah", "niggas", "niggaz", "nigger", "niggers", "nob", "nob jokey", "nobhead", "nobjocky", "nobjokey", "numbnuts", "nutsack", "orgasim", "orgasims", "orgasm", "orgasms", "p0rn", "pawn", "pecker", "penis", "penisfucker", "phonesex", "phuck", "phuk", "phuked", "phuking", "phukked", "phukking", "phuks", "phuq", "pigfucker", "pimpis", "piss", "pissed", "pisser", "pissers", "pisses", "pissflaps", "pissin", "pissing", "pissoff", "poop", "porn", "porno", "pornography", "pornos", "prick", "pricks", "pron", "pube", "pusse", "pussi", "pussies", "pussy", "pussys", "rectum", "retard", "rimjaw", "rimming", "s hit", "s.o.b.", "sadist", "schlong", "screwing", "scroat", "scrote", "scrotum", "semen", "sex", "sh!+", "sh!t", "sh1t", "shag", "shagger", "shaggin", "shagging", "shemale", "shi+", "shit", "shitdick", "shite", "shited", "shitey", "shitfuck", "shitfull", "shithead", "shiting", "shitings", "shits", "shitted", "shitter", "shitters", "shitting", "shittings", "shitty", "skank", "slut", "sluts", "smegma", "smut", "snatch", "son-of-a-bitch", "spac", "spunk", "s_h_i_t", "t1tt1e5", "t1tties", "teets", "teez", "testical", "testicle", "tit", "titfuck", "tits", "titt", "tittie5", "tittiefucker", "titties", "tittyfuck", "tittywank", "titwank", "tosser", "turd", "tw4t", "twat", "twathead", "twatty", "twunt", "twunter", "v14gra", "v1gra", "vagina", "viagra", "vulva", "w00se", "wang", "wank", "wanker", "wanky", "whoar", "whore", "willies", "willy", "xrated", "xxx"]; \ No newline at end of file diff --git a/node_modules/badwords-list/lib/index.js b/node_modules/badwords-list/lib/index.js new file mode 100644 index 0000000..e684671 --- /dev/null +++ b/node_modules/badwords-list/lib/index.js @@ -0,0 +1,5 @@ +module.exports = { + object: require('./object'), + array: require('./array'), + regex: require('./regexp') +}; \ No newline at end of file diff --git a/node_modules/badwords-list/lib/object.js b/node_modules/badwords-list/lib/object.js new file mode 100644 index 0000000..5a3d7ad --- /dev/null +++ b/node_modules/badwords-list/lib/object.js @@ -0,0 +1 @@ +module.exports = {"4r5e": 1, "5h1t": 1, "5hit": 1, "a55": 1, "anal": 1, "anus": 1, "ar5e": 1, "arrse": 1, "arse": 1, "ass": 1, "ass-fucker": 1, "asses": 1, "assfucker": 1, "assfukka": 1, "asshole": 1, "assholes": 1, "asswhole": 1, "a_s_s": 1, "b!tch": 1, "b00bs": 1, "b17ch": 1, "b1tch": 1, "ballbag": 1, "balls": 1, "ballsack": 1, "bastard": 1, "beastial": 1, "beastiality": 1, "bellend": 1, "bestial": 1, "bestiality": 1, "bi+ch": 1, "biatch": 1, "bitch": 1, "bitcher": 1, "bitchers": 1, "bitches": 1, "bitchin": 1, "bitching": 1, "bloody": 1, "blow job": 1, "blowjob": 1, "blowjobs": 1, "boiolas": 1, "bollock": 1, "bollok": 1, "boner": 1, "boob": 1, "boobs": 1, "booobs": 1, "boooobs": 1, "booooobs": 1, "booooooobs": 1, "breasts": 1, "buceta": 1, "bugger": 1, "bum": 1, "bunny fucker": 1, "butt": 1, "butthole": 1, "buttmuch": 1, "buttplug": 1, "c0ck": 1, "c0cksucker": 1, "carpet muncher": 1, "cawk": 1, "chink": 1, "cipa": 1, "cl1t": 1, "clit": 1, "clitoris": 1, "clits": 1, "cnut": 1, "cock": 1, "cock-sucker": 1, "cockface": 1, "cockhead": 1, "cockmunch": 1, "cockmuncher": 1, "cocks": 1, "cocksuck": 1, "cocksucked": 1, "cocksucker": 1, "cocksucking": 1, "cocksucks": 1, "cocksuka": 1, "cocksukka": 1, "cok": 1, "cokmuncher": 1, "coksucka": 1, "coon": 1, "cox": 1, "crap": 1, "cum": 1, "cummer": 1, "cumming": 1, "cums": 1, "cumshot": 1, "cunilingus": 1, "cunillingus": 1, "cunnilingus": 1, "cunt": 1, "cuntlick": 1, "cuntlicker": 1, "cuntlicking": 1, "cunts": 1, "cyalis": 1, "cyberfuc": 1, "cyberfuck": 1, "cyberfucked": 1, "cyberfucker": 1, "cyberfuckers": 1, "cyberfucking": 1, "d1ck": 1, "damn": 1, "dick": 1, "dickhead": 1, "dildo": 1, "dildos": 1, "dink": 1, "dinks": 1, "dirsa": 1, "dlck": 1, "dog-fucker": 1, "doggin": 1, "dogging": 1, "donkeyribber": 1, "doosh": 1, "duche": 1, "dyke": 1, "ejaculate": 1, "ejaculated": 1, "ejaculates": 1, "ejaculating": 1, "ejaculatings": 1, "ejaculation": 1, "ejakulate": 1, "f u c k": 1, "f u c k e r": 1, "f4nny": 1, "fag": 1, "fagging": 1, "faggitt": 1, "faggot": 1, "faggs": 1, "fagot": 1, "fagots": 1, "fags": 1, "fanny": 1, "fannyflaps": 1, "fannyfucker": 1, "fanyy": 1, "fatass": 1, "fcuk": 1, "fcuker": 1, "fcuking": 1, "feck": 1, "fecker": 1, "felching": 1, "fellate": 1, "fellatio": 1, "fingerfuck": 1, "fingerfucked": 1, "fingerfucker": 1, "fingerfuckers": 1, "fingerfucking": 1, "fingerfucks": 1, "fistfuck": 1, "fistfucked": 1, "fistfucker": 1, "fistfuckers": 1, "fistfucking": 1, "fistfuckings": 1, "fistfucks": 1, "flange": 1, "fook": 1, "fooker": 1, "fuck": 1, "fucka": 1, "fucked": 1, "fucker": 1, "fuckers": 1, "fuckhead": 1, "fuckheads": 1, "fuckin": 1, "fucking": 1, "fuckings": 1, "fuckingshitmotherfucker": 1, "fuckme": 1, "fucks": 1, "fuckwhit": 1, "fuckwit": 1, "fudge packer": 1, "fudgepacker": 1, "fuk": 1, "fuker": 1, "fukker": 1, "fukkin": 1, "fuks": 1, "fukwhit": 1, "fukwit": 1, "fux": 1, "fux0r": 1, "f_u_c_k": 1, "gangbang": 1, "gangbanged": 1, "gangbangs": 1, "gaylord": 1, "gaysex": 1, "goatse": 1, "God": 1, "god-dam": 1, "god-damned": 1, "goddamn": 1, "goddamned": 1, "hardcoresex": 1, "hell": 1, "heshe": 1, "hoar": 1, "hoare": 1, "hoer": 1, "homo": 1, "hore": 1, "horniest": 1, "horny": 1, "hotsex": 1, "jack-off": 1, "jackoff": 1, "jap": 1, "jerk-off": 1, "jism": 1, "jiz": 1, "jizm": 1, "jizz": 1, "kawk": 1, "knob": 1, "knobead": 1, "knobed": 1, "knobend": 1, "knobhead": 1, "knobjocky": 1, "knobjokey": 1, "kock": 1, "kondum": 1, "kondums": 1, "kum": 1, "kummer": 1, "kumming": 1, "kums": 1, "kunilingus": 1, "l3i+ch": 1, "l3itch": 1, "labia": 1, "lust": 1, "lusting": 1, "m0f0": 1, "m0fo": 1, "m45terbate": 1, "ma5terb8": 1, "ma5terbate": 1, "masochist": 1, "master-bate": 1, "masterb8": 1, "masterbat*": 1, "masterbat3": 1, "masterbate": 1, "masterbation": 1, "masterbations": 1, "masturbate": 1, "mo-fo": 1, "mof0": 1, "mofo": 1, "mothafuck": 1, "mothafucka": 1, "mothafuckas": 1, "mothafuckaz": 1, "mothafucked": 1, "mothafucker": 1, "mothafuckers": 1, "mothafuckin": 1, "mothafucking": 1, "mothafuckings": 1, "mothafucks": 1, "mother fucker": 1, "motherfuck": 1, "motherfucked": 1, "motherfucker": 1, "motherfuckers": 1, "motherfuckin": 1, "motherfucking": 1, "motherfuckings": 1, "motherfuckka": 1, "motherfucks": 1, "muff": 1, "mutha": 1, "muthafecker": 1, "muthafuckker": 1, "muther": 1, "mutherfucker": 1, "n1gga": 1, "n1gger": 1, "nazi": 1, "nigg3r": 1, "nigg4h": 1, "nigga": 1, "niggah": 1, "niggas": 1, "niggaz": 1, "nigger": 1, "niggers": 1, "nob": 1, "nob jokey": 1, "nobhead": 1, "nobjocky": 1, "nobjokey": 1, "numbnuts": 1, "nutsack": 1, "orgasim": 1, "orgasims": 1, "orgasm": 1, "orgasms": 1, "p0rn": 1, "pawn": 1, "pecker": 1, "penis": 1, "penisfucker": 1, "phonesex": 1, "phuck": 1, "phuk": 1, "phuked": 1, "phuking": 1, "phukked": 1, "phukking": 1, "phuks": 1, "phuq": 1, "pigfucker": 1, "pimpis": 1, "piss": 1, "pissed": 1, "pisser": 1, "pissers": 1, "pisses": 1, "pissflaps": 1, "pissin": 1, "pissing": 1, "pissoff": 1, "poop": 1, "porn": 1, "porno": 1, "pornography": 1, "pornos": 1, "prick": 1, "pricks": 1, "pron": 1, "pube": 1, "pusse": 1, "pussi": 1, "pussies": 1, "pussy": 1, "pussys": 1, "rectum": 1, "retard": 1, "rimjaw": 1, "rimming": 1, "s hit": 1, "s.o.b.": 1, "sadist": 1, "schlong": 1, "screwing": 1, "scroat": 1, "scrote": 1, "scrotum": 1, "semen": 1, "sex": 1, "sh!+": 1, "sh!t": 1, "sh1t": 1, "shag": 1, "shagger": 1, "shaggin": 1, "shagging": 1, "shemale": 1, "shi+": 1, "shit": 1, "shitdick": 1, "shite": 1, "shited": 1, "shitey": 1, "shitfuck": 1, "shitfull": 1, "shithead": 1, "shiting": 1, "shitings": 1, "shits": 1, "shitted": 1, "shitter": 1, "shitters": 1, "shitting": 1, "shittings": 1, "shitty": 1, "skank": 1, "slut": 1, "sluts": 1, "smegma": 1, "smut": 1, "snatch": 1, "son-of-a-bitch": 1, "spac": 1, "spunk": 1, "s_h_i_t": 1, "t1tt1e5": 1, "t1tties": 1, "teets": 1, "teez": 1, "testical": 1, "testicle": 1, "tit": 1, "titfuck": 1, "tits": 1, "titt": 1, "tittie5": 1, "tittiefucker": 1, "titties": 1, "tittyfuck": 1, "tittywank": 1, "titwank": 1, "tosser": 1, "turd": 1, "tw4t": 1, "twat": 1, "twathead": 1, "twatty": 1, "twunt": 1, "twunter": 1, "v14gra": 1, "v1gra": 1, "vagina": 1, "viagra": 1, "vulva": 1, "w00se": 1, "wang": 1, "wank": 1, "wanker": 1, "wanky": 1, "whoar": 1, "whore": 1, "willies": 1, "willy": 1, "xrated": 1, "xxx": 1}; \ No newline at end of file diff --git a/node_modules/badwords-list/lib/regexp.js b/node_modules/badwords-list/lib/regexp.js new file mode 100644 index 0000000..3d61c38 --- /dev/null +++ b/node_modules/badwords-list/lib/regexp.js @@ -0,0 +1 @@ +module.exports = /\b(4r5e|5h1t|5hit|a55|anal|anus|ar5e|arrse|arse|ass|ass-fucker|asses|assfucker|assfukka|asshole|assholes|asswhole|a_s_s|b!tch|b00bs|b17ch|b1tch|ballbag|balls|ballsack|bastard|beastial|beastiality|bellend|bestial|bestiality|bi\+ch|biatch|bitch|bitcher|bitchers|bitches|bitchin|bitching|bloody|blow job|blowjob|blowjobs|boiolas|bollock|bollok|boner|boob|boobs|booobs|boooobs|booooobs|booooooobs|breasts|buceta|bugger|bum|bunny fucker|butt|butthole|buttmuch|buttplug|c0ck|c0cksucker|carpet muncher|cawk|chink|cipa|cl1t|clit|clitoris|clits|cnut|cock|cock-sucker|cockface|cockhead|cockmunch|cockmuncher|cocks|cocksuck|cocksucked|cocksucker|cocksucking|cocksucks|cocksuka|cocksukka|cok|cokmuncher|coksucka|coon|cox|crap|cum|cummer|cumming|cums|cumshot|cunilingus|cunillingus|cunnilingus|cunt|cuntlick|cuntlicker|cuntlicking|cunts|cyalis|cyberfuc|cyberfuck|cyberfucked|cyberfucker|cyberfuckers|cyberfucking|d1ck|damn|dick|dickhead|dildo|dildos|dink|dinks|dirsa|dlck|dog-fucker|doggin|dogging|donkeyribber|doosh|duche|dyke|ejaculate|ejaculated|ejaculates|ejaculating|ejaculatings|ejaculation|ejakulate|f u c k|f u c k e r|f4nny|fag|fagging|faggitt|faggot|faggs|fagot|fagots|fags|fanny|fannyflaps|fannyfucker|fanyy|fatass|fcuk|fcuker|fcuking|feck|fecker|felching|fellate|fellatio|fingerfuck|fingerfucked|fingerfucker|fingerfuckers|fingerfucking|fingerfucks|fistfuck|fistfucked|fistfucker|fistfuckers|fistfucking|fistfuckings|fistfucks|flange|fook|fooker|fuck|fucka|fucked|fucker|fuckers|fuckhead|fuckheads|fuckin|fucking|fuckings|fuckingshitmotherfucker|fuckme|fucks|fuckwhit|fuckwit|fudge packer|fudgepacker|fuk|fuker|fukker|fukkin|fuks|fukwhit|fukwit|fux|fux0r|f_u_c_k|gangbang|gangbanged|gangbangs|gaylord|gaysex|goatse|God|god-dam|god-damned|goddamn|goddamned|hardcoresex|hell|heshe|hoar|hoare|hoer|homo|hore|horniest|horny|hotsex|jack-off|jackoff|jap|jerk-off|jism|jiz|jizm|jizz|kawk|knob|knobead|knobed|knobend|knobhead|knobjocky|knobjokey|kock|kondum|kondums|kum|kummer|kumming|kums|kunilingus|l3i\+ch|l3itch|labia|lust|lusting|m0f0|m0fo|m45terbate|ma5terb8|ma5terbate|masochist|master-bate|masterb8|masterbat*|masterbat3|masterbate|masterbation|masterbations|masturbate|mo-fo|mof0|mofo|mothafuck|mothafucka|mothafuckas|mothafuckaz|mothafucked|mothafucker|mothafuckers|mothafuckin|mothafucking|mothafuckings|mothafucks|mother fucker|motherfuck|motherfucked|motherfucker|motherfuckers|motherfuckin|motherfucking|motherfuckings|motherfuckka|motherfucks|muff|mutha|muthafecker|muthafuckker|muther|mutherfucker|n1gga|n1gger|nazi|nigg3r|nigg4h|nigga|niggah|niggas|niggaz|nigger|niggers|nob|nob jokey|nobhead|nobjocky|nobjokey|numbnuts|nutsack|orgasim|orgasims|orgasm|orgasms|p0rn|pawn|pecker|penis|penisfucker|phonesex|phuck|phuk|phuked|phuking|phukked|phukking|phuks|phuq|pigfucker|pimpis|piss|pissed|pisser|pissers|pisses|pissflaps|pissin|pissing|pissoff|poop|porn|porno|pornography|pornos|prick|pricks|pron|pube|pusse|pussi|pussies|pussy|pussys|rectum|retard|rimjaw|rimming|s hit|s.o.b.|sadist|schlong|screwing|scroat|scrote|scrotum|semen|sex|sh!\+|sh!t|sh1t|shag|shagger|shaggin|shagging|shemale|shi\+|shit|shitdick|shite|shited|shitey|shitfuck|shitfull|shithead|shiting|shitings|shits|shitted|shitter|shitters|shitting|shittings|shitty|skank|slut|sluts|smegma|smut|snatch|son-of-a-bitch|spac|spunk|s_h_i_t|t1tt1e5|t1tties|teets|teez|testical|testicle|tit|titfuck|tits|titt|tittie5|tittiefucker|titties|tittyfuck|tittywank|titwank|tosser|turd|tw4t|twat|twathead|twatty|twunt|twunter|v14gra|v1gra|vagina|viagra|vulva|w00se|wang|wank|wanker|wanky|whoar|whore|willies|willy|xrated|xxx)\b/gi; \ No newline at end of file diff --git a/node_modules/badwords-list/package.json b/node_modules/badwords-list/package.json new file mode 100644 index 0000000..6d0a317 --- /dev/null +++ b/node_modules/badwords-list/package.json @@ -0,0 +1,33 @@ +{ + "name": "badwords-list", + "version": "1.0.0", + "author": "Michael Price