🎩 You're Invited:Meet the Socket team at Black Hat in Las Vegas, August 3-6.RSVP
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

A Node.js library for filtering sensitive words using a prefix tree (Trie).

Source
npmnpm
Version
1.0.0
Version published
Weekly downloads
5
-50%
Maintainers
1
Weekly downloads
 
Created
Source

node-sensitive-word-filtering

基于 node 实现的敏感词过滤脚本(前缀树)

示例使用

const trie = new Trie();
trie.insert('敏感词1');
trie.insert('敏感词12');

const inputText = '这里包含敏感词1和其他内容。';
const filteredText = trie.filter(inputText);

console.log(filteredText); // 输出: 这里包含****和其他内容。

const inputText2 = '灵敏';
const filteredText2 = trie.filter(inputText2);
console.log(inputText2); // 输出: 灵敏

Keywords

sensitive

FAQs

Package last updated on 02 Dec 2024

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts