JSPM

cuss-word-filter-ko

1.2.0
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 2
  • Score
    100M100P100Q40817F
  • License MIT

한국어 욕을 filtering 하는 모듈

Package Exports

  • cuss-word-filter-ko
  • cuss-word-filter-ko/dist/cussWordFilter.js

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (cuss-word-filter-ko) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

Welcome to cuss-word-filter-ko 👋

한국어 욕설을 바꿔주는 간단한 모듈

🏠 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

image

Contributing

Contributions, issues and feature requests are welcome!

License

MIT