0.0.3 • Published 3 years ago
@h7ml/badwords v0.0.3
@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