1.2.0 β’ Published 2 years ago
cuss-word-filter-ko v1.2.0
π Homepage
π Npm
Installation
npm i cuss-word-filter-ko
Options
type CussWordFilterOptions = {
/**
* @default "./cuss-word-list.json" μ μλ λ¨μ΄λ€
* @description νν°λ§ν λ¨μ΄λ€
*/
cussWords?: string[];
/**
* @default '*'
* @example '****'
*/
replacement?: string;
/**
* @default false
* @description default cussWords μ constructor option μμ μ λ¬λ cussWords λ₯Ό ν©μΉ μ§ μ¬λΆ
*/
mergeDefaultData?: boolean;
/**
* @default []
* @description νν°λ§μ μ μΈν λ¨μ΄λ€, isCussWord, filter method μμ μ μ©λ¨
*/
whiteList?: string[];
}
Usage
const { CussWordFilter } = require("cuss-word-filter-ko");
const filter = new CussWordFilter({});
console.log(filter.filter("γ
γ
λμ")); // ** λμ
or
import { CussWordFilter } from "cuss-word-filter-ko";
const filter = new CussWordFilter({});
console.log(filter.filter("γ
γ
λμ")); // ** λμ
Test Coverage
Contributing
Contributions, issues and feature requests are welcome!
License
MIT