From cb2c10e618a01fd69e34e2414e41e446fdf03025 Mon Sep 17 00:00:00 2001 From: Alessandro Buonocore <60114301+bncal@users.noreply.github.com> Date: Fri, 17 Mar 2023 20:06:17 +0100 Subject: [PATCH] removed build --- .gitignore | 2 - build/functions.d.ts | 24 ---------- build/functions.js | 64 --------------------------- build/helpers/banned-words.json | 78 --------------------------------- build/helpers/functions.d.ts | 24 ---------- build/helpers/functions.js | 64 --------------------------- build/index.d.ts | 1 - build/index.js | 11 ----- 8 files changed, 268 deletions(-) delete mode 100644 build/functions.d.ts delete mode 100644 build/functions.js delete mode 100644 build/helpers/banned-words.json delete mode 100644 build/helpers/functions.d.ts delete mode 100644 build/helpers/functions.js delete mode 100644 build/index.d.ts delete mode 100644 build/index.js diff --git a/.gitignore b/.gitignore index 00f4056..9b9ca9e 100644 --- a/.gitignore +++ b/.gitignore @@ -105,5 +105,3 @@ dist # Stores VSCode versions used for testing VSCode extensions .vscode-test - -build/ \ No newline at end of file diff --git a/build/functions.d.ts b/build/functions.d.ts deleted file mode 100644 index 31ef440..0000000 --- a/build/functions.d.ts +++ /dev/null @@ -1,24 +0,0 @@ -/** - * @description hasBannedWords checks if a word or a long text contains banned words. - * @param text text to be checked if it contains banned words - * @returns boolean - * - * @example hasBannedWords("Badword"); - * Output: true - */ -declare const hasBannedWords: (text: string) => boolean; -/** - * @description redactBannedWords redacts banned words in a text and/or long text. - * @param text text to be redacted - * @param censor (optional) string to replace the banned word with. Default is "*****" - * @returns text with banned words replaced with censor. - * - * @example redactBannedWords("Leave this badword outta my badwording face!"); - * Output: Leave this ***** outta my ***** face! - * - * @example redactBannedWords("Leave this badword outta my badwording face!", "[REDACTED]"); - * Output: Leave this [REDACTED] outta my [REDACTED] face! - * - */ -declare const redactBannedWords: (text: string, censor?: string) => string; -export { hasBannedWords, redactBannedWords }; diff --git a/build/functions.js b/build/functions.js deleted file mode 100644 index a3af280..0000000 --- a/build/functions.js +++ /dev/null @@ -1,64 +0,0 @@ -"use strict"; -var __importDefault = (this && this.__importDefault) || function (mod) { - return (mod && mod.__esModule) ? mod : { "default": mod }; -}; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.redactBannedWords = exports.hasBannedWords = void 0; -var banned_words_json_1 = __importDefault(require("./helpers/banned-words.json")); -/** - * @description hasBannedWords checks if a word or a long text contains banned words. - * @param text text to be checked if it contains banned words - * @returns boolean - * - * @example hasBannedWords("Badword"); - * Output: true - */ -var hasBannedWords = function (text) { - if (text.length == 1) { - if (banned_words_json_1.default.words.includes(text)) { - return true; - } - } - if (text.length > 1) { - var words = text.split(" "); - for (var i = 0; i < words.length; i++) { - if (banned_words_json_1.default.words.includes(words[i])) { - return true; - } - } - } - return false; -}; -exports.hasBannedWords = hasBannedWords; -/** - * @description redactBannedWords redacts banned words in a text and/or long text. - * @param text text to be redacted - * @param censor (optional) string to replace the banned word with. Default is "*****" - * @returns text with banned words replaced with censor. - * - * @example redactBannedWords("Leave this badword outta my badwording face!"); - * Output: Leave this ***** outta my ***** face! - * - * @example redactBannedWords("Leave this badword outta my badwording face!", "[REDACTED]"); - * Output: Leave this [REDACTED] outta my [REDACTED] face! - * - */ -var redactBannedWords = function (text, censor) { - if (censor === void 0) { censor = "******"; } - if (text.length == 1) { - if (banned_words_json_1.default.words.includes(text)) { - return censor; - } - } - if (text.length > 1) { - var words_1 = text.split(" "); - words_1.forEach(function (word, i) { - if (hasBannedWords(word)) { - words_1[i] = censor; - } - }); - return words_1.join(" "); - } - return text; -}; -exports.redactBannedWords = redactBannedWords; diff --git a/build/helpers/banned-words.json b/build/helpers/banned-words.json deleted file mode 100644 index a0fab50..0000000 --- a/build/helpers/banned-words.json +++ /dev/null @@ -1,78 +0,0 @@ -{ - "words": [ - "anal", - "anus", - "arse", - "ass", - "balls", - "ballsack", - "bastard", - "biatch", - "bitch", - "bloody", - "blow job", - "blowjob", - "bollock", - "bollok", - "boner", - "boob", - "bugger", - "bum", - "butt", - "buttplug", - "clitoris", - "cock", - "coon", - "crap", - "cunt", - "damn", - "dick", - "dildo", - "dyke", - "f u c k", - "fag", - "feck", - "felching", - "fellate", - "fellatio", - "flange", - "fuck", - "fudge packer", - "fudgepacker", - "God damn", - "Goddamn", - "hell", - "homo", - "jerk", - "jizz", - "knob end", - "knobend", - "labia", - "lmao", - "lmfao", - "muff", - "nigga", - "nigger", - "penis", - "piss", - "poop", - "prick", - "pube", - "pussy", - "queer", - "scrotum", - "sex", - "sh1t", - "shit", - "slut", - "spunk", - "tit", - "tosser", - "turd", - "twat", - "vagina", - "wank", - "whore", - "wtf" - ] -} diff --git a/build/helpers/functions.d.ts b/build/helpers/functions.d.ts deleted file mode 100644 index 31ef440..0000000 --- a/build/helpers/functions.d.ts +++ /dev/null @@ -1,24 +0,0 @@ -/** - * @description hasBannedWords checks if a word or a long text contains banned words. - * @param text text to be checked if it contains banned words - * @returns boolean - * - * @example hasBannedWords("Badword"); - * Output: true - */ -declare const hasBannedWords: (text: string) => boolean; -/** - * @description redactBannedWords redacts banned words in a text and/or long text. - * @param text text to be redacted - * @param censor (optional) string to replace the banned word with. Default is "*****" - * @returns text with banned words replaced with censor. - * - * @example redactBannedWords("Leave this badword outta my badwording face!"); - * Output: Leave this ***** outta my ***** face! - * - * @example redactBannedWords("Leave this badword outta my badwording face!", "[REDACTED]"); - * Output: Leave this [REDACTED] outta my [REDACTED] face! - * - */ -declare const redactBannedWords: (text: string, censor?: string) => string; -export { hasBannedWords, redactBannedWords }; diff --git a/build/helpers/functions.js b/build/helpers/functions.js deleted file mode 100644 index 1f168b7..0000000 --- a/build/helpers/functions.js +++ /dev/null @@ -1,64 +0,0 @@ -"use strict"; -var __importDefault = (this && this.__importDefault) || function (mod) { - return (mod && mod.__esModule) ? mod : { "default": mod }; -}; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.redactBannedWords = exports.hasBannedWords = void 0; -var banned_words_json_1 = __importDefault(require("./banned-words.json")); -/** - * @description hasBannedWords checks if a word or a long text contains banned words. - * @param text text to be checked if it contains banned words - * @returns boolean - * - * @example hasBannedWords("Badword"); - * Output: true - */ -var hasBannedWords = function (text) { - if (text.length == 1) { - if (banned_words_json_1.default.words.includes(text)) { - return true; - } - } - if (text.length > 1) { - var words = text.split(" "); - for (var i = 0; i < words.length; i++) { - if (banned_words_json_1.default.words.includes(words[i])) { - return true; - } - } - } - return false; -}; -exports.hasBannedWords = hasBannedWords; -/** - * @description redactBannedWords redacts banned words in a text and/or long text. - * @param text text to be redacted - * @param censor (optional) string to replace the banned word with. Default is "*****" - * @returns text with banned words replaced with censor. - * - * @example redactBannedWords("Leave this badword outta my badwording face!"); - * Output: Leave this ***** outta my ***** face! - * - * @example redactBannedWords("Leave this badword outta my badwording face!", "[REDACTED]"); - * Output: Leave this [REDACTED] outta my [REDACTED] face! - * - */ -var redactBannedWords = function (text, censor) { - if (censor === void 0) { censor = "******"; } - if (text.length == 1) { - if (banned_words_json_1.default.words.includes(text)) { - return censor; - } - } - if (text.length > 1) { - var words_1 = text.split(" "); - words_1.forEach(function (word, i) { - if (hasBannedWords(word)) { - words_1[i] = censor; - } - }); - return words_1.join(" "); - } - return text; -}; -exports.redactBannedWords = redactBannedWords; diff --git a/build/index.d.ts b/build/index.d.ts deleted file mode 100644 index cb0ff5c..0000000 --- a/build/index.d.ts +++ /dev/null @@ -1 +0,0 @@ -export {}; diff --git a/build/index.js b/build/index.js deleted file mode 100644 index 90c33c9..0000000 --- a/build/index.js +++ /dev/null @@ -1,11 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -var functions_1 = require("./functions"); -console.log((0, functions_1.redactBannedWords)("Leave this fuck outta my badwording face! ")); -// Output: Leave this ***** outta my ***** face! -console.log((0, functions_1.redactBannedWords)("Leave this fuck outta my badwording face!", "[REDACTED]")); -// Output: Leave this [REDACTED] outta my [REDACTED] face! -console.log((0, functions_1.hasBannedWords)("jizz")); -// Output: true -console.log((0, functions_1.hasBannedWords)("Hello wor ld!")); -// Output: false