@sideid/id-profanity-filter 1.9.6 → 1.10.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.eslintrc.js +44 -16
- package/.github/workflows/release.yml +62 -0
- package/CONTRIBUTING.md +150 -150
- package/LICENSE +21 -21
- package/README.md +548 -506
- package/dist/config/options.d.ts +24 -0
- package/dist/constants/categories/blasphemy.d.ts +4 -0
- package/dist/constants/categories/disgusting.d.ts +4 -0
- package/dist/constants/categories/drugs.d.ts +4 -0
- package/dist/constants/categories/profanity.d.ts +4 -0
- package/dist/constants/categories/slur.d.ts +4 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.esm.js +923 -94
- package/dist/index.esm.js.map +1 -1
- package/dist/index.js +924 -93
- package/dist/index.js.map +1 -1
- package/dist/types/index.d.ts +2 -0
- package/dist/utils/ahoCorasick.d.ts +36 -0
- package/dist/utils/similarityUtils.d.ts +35 -0
- package/eslint.config.mjs +40 -0
- package/examples/advanced.ts +120 -120
- package/examples/basic.ts +71 -71
- package/examples/custom-list.ts +140 -140
- package/jest.config.mjs +10 -10
- package/package.json +3 -2
- package/prettierrc +6 -6
- package/rollup.config.mjs +35 -35
- package/src/config/options.ts +2 -0
- package/src/constants/categories/blasphemy.ts +25 -0
- package/src/constants/categories/disgusting.ts +82 -0
- package/src/constants/categories/drugs.ts +72 -0
- package/src/constants/categories/profanity.ts +139 -0
- package/src/constants/categories/slur.ts +102 -0
- package/src/constants/regions/general.ts +111 -2
- package/src/constants/regions/jawa.ts +257 -3
- package/src/constants/wordList.ts +15 -8
- package/src/core/analyzer.ts +28 -13
- package/src/core/filter.ts +178 -37
- package/src/core/matcher.ts +146 -69
- package/src/index.ts +21 -2
- package/src/types/index.ts +4 -2
- package/src/utils/ahoCorasick.ts +179 -0
- package/src/utils/regexUtils.ts +0 -1
- package/src/utils/similarityUtils.ts +239 -7
- package/tsconfig.json +115 -115
- package/.github/workflows/ci.yml +0 -0
- package/dist/constants/categories/index.d.ts +0 -9
- package/dist/constants/regions/index.d.ts +0 -8
- package/src/constants/categories/index.ts +0 -31
- package/src/constants/regions/index.ts +0 -62
|
@@ -1,62 +0,0 @@
|
|
|
1
|
-
import { general } from './general';
|
|
2
|
-
import { jawa } from './jawa';
|
|
3
|
-
import { sunda } from './sunda';
|
|
4
|
-
import { betawi } from './betawi';
|
|
5
|
-
import { batak } from './batak';
|
|
6
|
-
// import { minang } from './minang';
|
|
7
|
-
// import { bali } from './bali';
|
|
8
|
-
// import { madura } from './madura';
|
|
9
|
-
// import { bugis } from './bugis';
|
|
10
|
-
// import { aceh } from './aceh';
|
|
11
|
-
// import { ambon } from './ambon';
|
|
12
|
-
// import { papua } from './papua';
|
|
13
|
-
// import { manado } from './manado';
|
|
14
|
-
// import { banjar } from './banjar';
|
|
15
|
-
// import { palembang } from './palembang';
|
|
16
|
-
// import { lampung } from './lampung';
|
|
17
|
-
// import { ntt } from './ntt';
|
|
18
|
-
// import { ntb } from './ntb';
|
|
19
|
-
|
|
20
|
-
export {
|
|
21
|
-
general,
|
|
22
|
-
jawa,
|
|
23
|
-
sunda,
|
|
24
|
-
betawi,
|
|
25
|
-
batak,
|
|
26
|
-
// minang,
|
|
27
|
-
// bali,
|
|
28
|
-
// madura,
|
|
29
|
-
// bugis,
|
|
30
|
-
// aceh,
|
|
31
|
-
// ambon,
|
|
32
|
-
// papua,
|
|
33
|
-
// manado,
|
|
34
|
-
// banjar,
|
|
35
|
-
// palembang,
|
|
36
|
-
// lampung,
|
|
37
|
-
// ntt,
|
|
38
|
-
// ntb,
|
|
39
|
-
};
|
|
40
|
-
|
|
41
|
-
export const allRegionWords = [
|
|
42
|
-
...general,
|
|
43
|
-
...jawa,
|
|
44
|
-
...sunda,
|
|
45
|
-
...betawi,
|
|
46
|
-
...batak,
|
|
47
|
-
// ...minang,
|
|
48
|
-
// ...bali,
|
|
49
|
-
// ...madura,
|
|
50
|
-
// ...bugis,
|
|
51
|
-
// ...aceh,
|
|
52
|
-
// ...ambon,
|
|
53
|
-
// ...papua,
|
|
54
|
-
// ...manado,
|
|
55
|
-
// ...banjar,
|
|
56
|
-
// ...palembang,
|
|
57
|
-
// ...lampung,
|
|
58
|
-
// ...ntt,
|
|
59
|
-
// ...ntb,
|
|
60
|
-
];
|
|
61
|
-
|
|
62
|
-
export default allRegionWords;
|