@h7ml/badwords
v0.0.3
Published
[](https://www.npmjs.com/package/@h7ml/badwords) [](https://github.com/h7ml/badwords/blob/main/LICEN
Readme
@h7ml/badwords
Install
npm
npm install @h7ml/badwordsyarn
yarn add @h7ml/badwordspnpm
pnpm add @h7ml/badwordsusage
import
import {badwords, checkWord} from '@h7ml/badwords'check
checkWord('天府广场', badwords) // true
checkWord('广场') // falseAPI
checkWord(text, words)
| parameter | type | default | require | description |
|-----------|-------------|------------|---------|---------------------------|
| text | string | _ | true | To check the text |
| words | string[] | badwords | false | Sensitive vocabulary list |
License
MIT License © 2022 Anthony Fu
