npm install @h7ml/badwords
yarn add @h7ml/badwords
pnpm add @h7ml/badwords
import {badwords, checkWord} from '@h7ml/badwords'
checkWord('天府广场', badwords) // true
checkWord('广场') // false
parameter | type | default | require | description |
---|---|---|---|---|
text |
string |
_ |
true |
To check the text |
words |
string[] |
badwords |
false |
Sensitive vocabulary list |