🚀 Socket Launch Week Day 5:Introducing Repository Access Permissions and Custom Roles.Learn more
Sign In

node-sensitive-word-filtering

Package Overview
Dependencies
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

node-sensitive-word-filtering - npm Package Compare versions

Comparing version
1.0.3
to
1.0.4
+25
-1
index.d.ts
declare class Trie {
/**
* Inserts a word into the Trie.
* @param word The word to insert.
*/
insert(word: string): void;
/**
* Checks if the Trie contains the specified word.
* @param word The word to check.
* @returns True if the word exists, otherwise false.
*/
contains(word: string): boolean;
/**
* Deletes a word from the Trie.
* @param word The word to delete.
*/
delete(word: string): void;
filter(text: string, ignoreSpaces?: boolean): string;
/**
* Filters the input text and replaces sensitive words with asterisks.
* @param options The filter options.
* @param options.text The input text to filter.
* @param options.ignoreSpaces Optional. Whether to ignore spaces between characters when matching. Defaults to false.
* @param options.ignoreCase Optional. Whether to ignore case when matching. Defaults to false.
* @returns The filtered text.
*/
filter(options: { text: string; ignoreSpaces?: boolean; ignoreCase?: boolean }): string;
}
export = Trie;
+1
-1
{
"name": "node-sensitive-word-filtering",
"version": "1.0.3",
"version": "1.0.4",
"description": "A Node.js library for filtering sensitive words using a prefix tree (Trie).",

@@ -5,0 +5,0 @@ "main": "sensitive-word-trie.js",