Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

sensitive-words-dfa-filter

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

sensitive-words-dfa-filter

The word filter via dfa.

  • 0.0.3
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

sensitive-words-filter

NPM Version NPM Downloads Build Linux Build Windows Build Test Coverage

文字过滤,支持敏感词匹配,由DFA算法实现

Install

npm install sensitive-words-dfa-filter --save

How to use

let Filter = require('sensitive-words-dfa-filter');

// 设定需要搜索的敏感字
let search = [
  'f',
  'filter'
];

// 初始化文字过滤器,将敏感字做成字典
Filter.instance().init(search);

// 运行
console.log(Filter.instance().replace('This is filter word!')); // This is ****** word!
console.log(Filter.instance().replace('This is fffffilterfffff word!')); // This is *************** word!

FAQs

Package last updated on 15 Nov 2019

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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc