Miss any of our Open RFC calls?Watch the recordings here! »

@zhangfuxing/keyword-filter

1.0.6 • Public • Published

keyword-filter

Sensitive word filter

Node.js 12+ required (Because of use Class private fields)

Install

$ npm i @zhangfuxing/keyword-filter

Useage

const assert = require('assert');
const WordFilter = require('@zhangfuxing/keyword-filter');
const dir = './keywords';
const text = '测试-兼职';
const wordFilter = new WordFilter(dir);
const result = '测试-**';
assert(result === wordFilter.filter(text));

Test

$ npm test

Install

npm i @zhangfuxing/keyword-filter

DownloadsWeekly Downloads

89

Version

1.0.6

License

MIT

Unpacked Size

17.7 kB

Total Files

9

Last publish

Collaborators

  • avatar