├── .editorconfig ├── .eslintrc.cjs ├── .github └── workflows │ ├── docs.yml │ ├── format.yml │ ├── release.yml │ └── test.yml ├── .gitignore ├── .husky └── pre-commit ├── .prettierignore ├── .prettierrc ├── .travis.yml ├── CHANGELOG.md ├── LICENSE ├── Makefile ├── README.md ├── ava.config.js ├── docs ├── .nojekyll ├── assets │ ├── highlight.css │ ├── icons.js │ ├── icons.svg │ ├── main.js │ ├── navigation.js │ ├── search.js │ └── style.css ├── classes │ └── Filter.html ├── index.html ├── interfaces │ └── FilterOptions.html ├── modules.html └── types │ └── LocalList.html ├── eslint.config.mjs ├── lint-staged.config.mjs ├── package.json ├── src ├── badwords.ts ├── index.ts ├── lang.json └── lang.ts ├── tests ├── addWords.spec.ts ├── ava.spec.ts ├── filter.spec.ts ├── isProfane.spec.ts ├── options.spec.ts ├── removeWords.spec.ts └── replaceWord.spec.ts ├── tsconfig.cjs.json ├── tsconfig.esm.json ├── tsconfig.json ├── tsconfig.tsbuildinfo └── yarn.lock /.editorconfig: -------------------------------------------------------------------------------- 1 | root = true 2 | 3 | [*] 4 | indent_style = space 5 | indent_size = 2 6 | end_of_line = lf 7 | charset = utf-8 8 | trim_trailing_whitespace = true 9 | insert_final_newline = true 10 | 11 | [*.md] 12 | trim_trailing_whitespace = false -------------------------------------------------------------------------------- /.eslintrc.cjs: -------------------------------------------------------------------------------- 1 | /* eslint-env node */ 2 | require('@rushstack/eslint-patch/modern-module-resolution') 3 | 4 | module.exports = { 5 | root: true, 6 | extends: [ 7 | 'plugin:vue/vue3-essential', 8 | 'eslint:recommended', 9 | '@vue/eslint-config-typescript', 10 | '@vue/eslint-config-prettier', 11 | 'plugin:vue/vue3-recommended', 12 | 'plugin:vue-pug/vue3-recommended', 13 | 'plugin:astro/recommended', 14 | ], 15 | parserOptions: { 16 | ecmaVersion: 'latest', 17 | }, 18 | ignorePatterns: ['postcss.config.cjs'], 19 | rules: { 20 | 'vue/no-setup-props-destructure': 'off', 21 | }, 22 | overrides: [ 23 | { 24 | files: ['src/**/*.astro'], 25 | parser: 'astro-eslint-parser', 26 | parserOptions: { 27 | parser: '@typescript-eslint/parser', 28 | extraFileExtensions: ['.astro'], 29 | }, 30 | }, 31 | ], 32 | } 33 | -------------------------------------------------------------------------------- /.github/workflows/docs.yml: -------------------------------------------------------------------------------- 1 | name: Deploy Docs to Pages 2 | 3 | on: 4 | push: 5 | branches: ['main', 'next'] 6 | workflow_dispatch: 7 | 8 | # Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages 9 | permissions: 10 | contents: read 11 | pages: write 12 | id-token: write 13 | 14 | # Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued. 15 | # However, do NOT cancel in-progress runs as we want to allow these production deployments to complete. 16 | concurrency: 17 | group: 'pages' 18 | cancel-in-progress: false 19 | 20 | jobs: 21 | # Single deploy job since we're just deploying 22 | deploy: 23 | environment: 24 | name: github-pages 25 | url: ${{ steps.deployment.outputs.page_url }} 26 | runs-on: ubuntu-latest 27 | steps: 28 | - name: Checkout 29 | uses: actions/checkout@v4 30 | - name: Setup Node.js 31 | uses: actions/setup-node@v1 32 | with: 33 | node-version: 20 34 | - name: Install Dependencies 35 | run: yarn install 36 | - name: Build 37 | run: | 38 | yarn build 39 | yarn typedoc 40 | - name: Setup Pages 41 | uses: actions/configure-pages@v5 42 | - name: Upload artifact 43 | uses: actions/upload-pages-artifact@v3 44 | with: 45 | # Upload docs folder 46 | path: 'docs' 47 | - name: Deploy to GitHub Pages 48 | id: deployment 49 | uses: actions/deploy-pages@v4 50 | -------------------------------------------------------------------------------- /.github/workflows/format.yml: -------------------------------------------------------------------------------- 1 | name: Format 2 | 3 | on: 4 | pull_request: 5 | types: [opened, synchronize, reopened] 6 | workflow_dispatch: 7 | 8 | jobs: 9 | lint-and-format: 10 | runs-on: ubuntu-latest 11 | steps: 12 | - uses: actions/checkout@v4 13 | - uses: actions/setup-node@v1 14 | with: 15 | node-version: 20 16 | - run: yarn install 17 | - run: | 18 | yarn lint:fix 19 | yarn prettier 20 | - name: Create Lint PR 21 | uses: peter-evans/create-pull-request@v6.0.5 22 | with: 23 | base: ${{ github.head_ref }} 24 | commit-message: 'style: ESlint + Prettier Lint' 25 | title: ESlint + Prettier Format 26 | body: Format * to standard format. 27 | branch: ${{ github.event.pull_request.head.ref }}-fmt 28 | add-paths: | 29 | src/* 30 | -------------------------------------------------------------------------------- /.github/workflows/release.yml: -------------------------------------------------------------------------------- 1 | name: Release 2 | 3 | on: 4 | push: 5 | branches: ['main'] 6 | 7 | jobs: 8 | publish-gpr: 9 | runs-on: ubuntu-latest 10 | steps: 11 | - uses: actions/checkout@v4 12 | - uses: actions/setup-node@v1 13 | with: 14 | node-version: 20 15 | registry-url: https://registry.npmjs.org/ 16 | - run: yarn install 17 | - run: yarn global add standard-version 18 | - run: git config --global user.email "action@github.com" 19 | - run: git config --global user.name "GitHub Action" 20 | - uses: EndBug/add-and-commit@v4 21 | env: 22 | GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} 23 | - run: yarn release 24 | env: 25 | NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} 26 | -------------------------------------------------------------------------------- /.github/workflows/test.yml: -------------------------------------------------------------------------------- 1 | name: Run the tests 2 | 3 | on: 4 | pull_request: 5 | branches: ['main'] 6 | 7 | jobs: 8 | build: 9 | runs-on: ubuntu-latest 10 | 11 | strategy: 12 | matrix: 13 | node-version: [18.x, 20.x] 14 | 15 | steps: 16 | - uses: actions/checkout@v3 17 | - name: Use Node.js ${{ matrix.node-version }} 18 | uses: actions/setup-node@v3 19 | with: 20 | node-version: ${{ matrix.node-version }} 21 | cache: 'npm' 22 | - name: Install NPM Dependencies 23 | run: yarn install 24 | - run: yarn test 25 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | lib-cov 2 | *.seed 3 | *.log 4 | *.csv 5 | *.dat 6 | *.out 7 | *.pid 8 | *.gz 9 | 10 | pids 11 | logs 12 | results 13 | dist 14 | .test 15 | npm-debug.log 16 | node_modules 17 | -------------------------------------------------------------------------------- /.husky/pre-commit: -------------------------------------------------------------------------------- 1 | yarn lint-staged -------------------------------------------------------------------------------- /.prettierignore: -------------------------------------------------------------------------------- 1 | node_modules 2 | .dist 3 | -------------------------------------------------------------------------------- /.prettierrc: -------------------------------------------------------------------------------- 1 | { 2 | "singleQuote": true, 3 | "trailingComma": "all", 4 | "semi": false 5 | } 6 | -------------------------------------------------------------------------------- /.travis.yml: -------------------------------------------------------------------------------- 1 | language: node_js 2 | node_js: 3 | - "8" 4 | script: npm test -------------------------------------------------------------------------------- /CHANGELOG.md: -------------------------------------------------------------------------------- 1 | # Changelog 2 | 3 | All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines. 4 | 5 | ## 4.0.0 (2024-08-18) 6 | 7 | ## [4.0.0-0](https://github.com/web-mech/badwords/compare/v3.0.4...v4.0.0-0) (2024-08-18) 8 | 9 | ### ⚠ BREAKING CHANGES 10 | 11 | - this release moving forward is only intended for v4 onward. please upgrade and test with caution before using in production. 12 | 13 | ### Features 14 | 15 | - add one more test case in filter ([2ab9783](https://github.com/web-mech/badwords/commit/2ab978315beb0a347f4af1f5ee33bd95d7d3e020)) 16 | - split string with backspace or underscore ([465d625](https://github.com/web-mech/badwords/commit/465d625debd165617cc446377de71c22515cbbd4)) 17 | 18 | ### Bug Fixes 19 | 20 | - **action:** install NPM dependencies ([b29c6c8](https://github.com/web-mech/badwords/commit/b29c6c82fbedcaf43548749c457a56407dbe0bc5)) 21 | - append single word filter test case ([43c8530](https://github.com/web-mech/badwords/commit/43c85301e644bbd4de5d587526ba0a9fa4cfed64)) 22 | - change filter title to not multilingual word ([cf8e4bc](https://github.com/web-mech/badwords/commit/cf8e4bc5996fb595a113c8c114886cec61715b68)) 23 | 24 | - v4 ([30d5d9f](https://github.com/web-mech/badwords/commit/30d5d9f014854fef4586a73e15a14d43832fe78e)) 25 | 26 | ### [3.0.4](https://github.com/web-mech/badwords/compare/v3.0.3...v3.0.4) (2020-11-16) 27 | 28 | 29 | 30 | ## [3.0.3](https://github.com/web-mech/badwords/compare/v3.0.2...v3.0.3) (2019-07-25) 31 | 32 | 33 | 34 | ## [3.0.2](https://github.com/web-mech/badwords/compare/v3.0.1...v3.0.2) (2019-03-14) 35 | 36 | ### Bug Fixes 37 | 38 | - **lang.json:** remove gay from badwords ([88d1aed](https://github.com/web-mech/badwords/commit/88d1aed)) 39 | 40 | 41 | 42 | ## [3.0.1](https://github.com/web-mech/badwords/compare/v3.0.0...v3.0.1) (2019-02-19) 43 | 44 | ### Bug Fixes 45 | 46 | - update removeWords functionality to be case-insensitive ([235121d](https://github.com/web-mech/badwords/commit/235121d)) 47 | 48 | 49 | 50 | # [3.0.0](https://github.com/web-mech/badwords/compare/v2.0.0...v3.0.0) (2018-10-23) 51 | 52 | ### Code Refactoring 53 | 54 | - utilize es6 spread in addWords/removeWords ([656b87c](https://github.com/web-mech/badwords/commit/656b87c)) 55 | 56 | ### BREAKING CHANGES 57 | 58 | - changes the way addWords is used, no longer accepts a single array as a parameter unless used with the spread operator 59 | 60 | 61 | 62 | # [2.0.0](https://github.com/web-mech/badwords/compare/v1.6.5...v2.0.0) (2018-10-23) 63 | 64 | ### Documentation 65 | 66 | - update documentation. add requirements for using lib moving forward ([9b2831d](https://github.com/web-mech/badwords/commit/9b2831d)) 67 | 68 | ### Features 69 | 70 | - **profane:** support profane phrases and well as words ([995ea1e](https://github.com/web-mech/badwords/commit/995ea1e)) 71 | 72 | ### BREAKING CHANGES 73 | 74 | - moving into es2016+ language features 75 | 76 | 77 | 78 | ## [1.6.5](https://github.com/web-mech/badwords/compare/v1.6.4...v1.6.5) (2018-10-23) 79 | 80 | 81 | 82 | ## [1.6.4](https://github.com/web-mech/badwords/compare/v1.6.3...v1.6.4) (2018-09-21) 83 | 84 | ### Bug Fixes 85 | 86 | - **isProfane:** Adding regex word boundary for isProfane ([3908f3c](https://github.com/web-mech/badwords/commit/3908f3c)) 87 | 88 | 89 | 90 | ## [1.6.3](https://github.com/web-mech/badwords/compare/v1.6.2...v1.6.3) (2018-08-02) 91 | 92 | 93 | 94 | ## [1.6.2](https://github.com/web-mech/badwords/compare/v1.6.1...v1.6.2) (2018-08-02) 95 | 96 | ### Bug Fixes 97 | 98 | - **isProfaneLike:** abort trying to match every instance of profane words. ([31126d6](https://github.com/web-mech/badwords/commit/31126d6)) 99 | 100 | 101 | 102 | ## [1.6.1](https://github.com/web-mech/badwords/compare/v1.6.0...v1.6.1) (2017-10-25) 103 | 104 | ### Bug Fixes 105 | 106 | - **isProfaneLike:** fix case sensitive checks within list ([bfa05ce](https://github.com/web-mech/badwords/commit/bfa05ce)) 107 | 108 | 109 | 110 | # [1.6.0](https://github.com/web-mech/badwords/compare/v1.5.2...v1.6.0) (2017-10-16) 111 | 112 | ### Features 113 | 114 | - fixes and updates ([8049222](https://github.com/web-mech/badwords/commit/8049222)) 115 | 116 | 117 | 118 | ## [1.5.2](https://github.com/web-mech/badwords/compare/v1.5.1...v1.5.2) (2017-10-16) 119 | 120 | ### Bug Fixes 121 | 122 | - support for better filtering ([7c8d0e2](https://github.com/web-mech/badwords/commit/7c8d0e2)) 123 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2015 Michael Price 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy of 6 | this software and associated documentation files (the "Software"), to deal in 7 | the Software without restriction, including without limitation the rights to 8 | use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of 9 | the Software, and to permit persons to whom the Software is furnished to do so, 10 | subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS 17 | FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR 18 | COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER 19 | IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 20 | CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 21 | -------------------------------------------------------------------------------- /Makefile: -------------------------------------------------------------------------------- 1 | .PHONY: test build docs 2 | 3 | test: 4 | @yarn test 5 | 6 | build: 7 | @yarn build 8 | 9 | docs: 10 | @yarn typedoc 11 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # bad-words 2 | 3 | A javascript filter for badwords 4 | 5 | [![Testing Testing](https://github.com/web-mech/badwords/actions/workflows/test.yml/badge.svg)](https://github.com/web-mech/badwords/actions/workflows/test.yml) 6 | [![Commitizen friendly](https://img.shields.io/badge/commitizen-friendly-brightgreen.svg)](http://commitizen.github.io/cz-cli/) 7 | [![semantic-release](https://img.shields.io/badge/%20%20%F0%9F%93%A6%F0%9F%9A%80-semantic--release-e10079.svg?style=flat-square)](https://github.com/semantic-release/semantic-release) 8 | [![TypeDoc](https://img.shields.io/badge/docs-typedoc-blue.svg)](https://web-mech.github.io/badwords/) 9 | 10 | ## Requirements 11 | 12 | As of version 2, requires you either have an environment that understands ES2016 and beyond or a transpiler like Babel. 13 | 14 | ## Installation 15 | 16 | yarn add bad-words 17 | 18 | ## Usage 19 | 20 | ```js 21 | import { Filter } from 'bad-words' 22 | ... 23 | const filter = new Filter(); 24 | 25 | console.log(filter.clean("Don't be an ash0le")); //Don't be an ****** 26 | ``` 27 | 28 | ### Placeholder Overrides 29 | 30 | ```js 31 | const customFilter = new Filter({ placeHolder: 'x' }) 32 | 33 | customFilter.clean("Don't be an ash0le") //Don't be an xxxxxx 34 | ``` 35 | 36 | ### Regex Overrides 37 | 38 | ```js 39 | const filter = new Filter({ regex: /\*|\.|$/gi }) 40 | 41 | const filter = new Filter({ replaceRegex: /[A-Za-z0-9가-힣_]/g }) 42 | //multilingual support for word filtering 43 | ``` 44 | 45 | ### Add words to the blacklist 46 | 47 | ```js 48 | const filter = new Filter() 49 | 50 | filter.addWords('some', 'bad', 'word') 51 | 52 | filter.clean('some bad word!') //**** *** ****! 53 | 54 | //or use an array using the spread operator 55 | 56 | const newBadWords = ['some', 'bad', 'word'] 57 | 58 | filter.addWords(...newBadWords) 59 | 60 | filter.clean('some bad word!') //**** *** ****! 61 | 62 | //or 63 | 64 | const filter = new Filter({ list: ['some', 'bad', 'word'] }) 65 | 66 | filter.clean('some bad word!') //**** *** ****! 67 | ``` 68 | 69 | ### Instantiate with an empty list 70 | 71 | ```js 72 | const filter = new Filter({ emptyList: true }) 73 | filter.clean('hell this wont clean anything') //hell this wont clean anything 74 | ``` 75 | 76 | ### Remove words from the blacklist 77 | 78 | ```js 79 | const filter = new Filter() 80 | 81 | filter.removeWords('hells', 'sadist') 82 | 83 | filter.clean('some hells word!') //some hells word! 84 | 85 | //or use an array using the spread operator 86 | 87 | const removeWords = ['hells', 'sadist'] 88 | 89 | filter.removeWords(...removeWords) 90 | 91 | filter.clean('some sadist hells word!') //some sadist hells word! 92 | ``` 93 | 94 | ## API Reference 95 | 96 | Check out [TypeDoc Documentation](https://web-mech.github.io/badwords/) 97 | 98 | ## Testing 99 | 100 | yarn test 101 | 102 | ## License 103 | 104 | The MIT License (MIT) 105 | 106 | Copyright (c) 2013 Michael Price 107 | 108 | Permission is hereby granted, free of charge, to any person obtaining a copy of 109 | this software and associated documentation files (the "Software"), to deal in 110 | the Software without restriction, including without limitation the rights to 111 | use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of 112 | the Software, and to permit persons to whom the Software is furnished to do so, 113 | subject to the following conditions: 114 | 115 | The above copyright notice and this permission notice shall be included in all 116 | copies or substantial portions of the Software. 117 | 118 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 119 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS 120 | FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR 121 | COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER 122 | IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 123 | CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 124 | -------------------------------------------------------------------------------- /ava.config.js: -------------------------------------------------------------------------------- 1 | export default { 2 | files: ['tests/**/**.spec.ts'], 3 | typescript: { 4 | compile: 'tsc', 5 | rewritePaths: { 'tests/': '.test/tests/', 'src/': '.test/src/' }, 6 | }, 7 | } 8 | -------------------------------------------------------------------------------- /docs/.nojekyll: -------------------------------------------------------------------------------- 1 | TypeDoc added this file to prevent GitHub Pages from using Jekyll. You can turn off this behavior by setting the `githubPages` option to false. -------------------------------------------------------------------------------- /docs/assets/highlight.css: -------------------------------------------------------------------------------- 1 | :root { 2 | --light-hl-0: #af00db; 3 | --dark-hl-0: #c586c0; 4 | --light-hl-1: #000000; 5 | --dark-hl-1: #d4d4d4; 6 | --light-hl-2: #001080; 7 | --dark-hl-2: #9cdcfe; 8 | --light-hl-3: #a31515; 9 | --dark-hl-3: #ce9178; 10 | --light-hl-4: #0000ff; 11 | --dark-hl-4: #569cd6; 12 | --light-hl-5: #0070c1; 13 | --dark-hl-5: #4fc1ff; 14 | --light-hl-6: #795e26; 15 | --dark-hl-6: #dcdcaa; 16 | --light-hl-7: #008000; 17 | --dark-hl-7: #6a9955; 18 | --light-hl-8: #811f3f; 19 | --dark-hl-8: #d16969; 20 | --light-hl-9: #ee0000; 21 | --dark-hl-9: #d7ba7d; 22 | --light-hl-10: #ee0000; 23 | --dark-hl-10: #dcdcaa; 24 | --light-hl-11: #d16969; 25 | --dark-hl-11: #ce9178; 26 | --light-code-background: #ffffff; 27 | --dark-code-background: #1e1e1e; 28 | } 29 | 30 | @media (prefers-color-scheme: light) { 31 | :root { 32 | --hl-0: var(--light-hl-0); 33 | --hl-1: var(--light-hl-1); 34 | --hl-2: var(--light-hl-2); 35 | --hl-3: var(--light-hl-3); 36 | --hl-4: var(--light-hl-4); 37 | --hl-5: var(--light-hl-5); 38 | --hl-6: var(--light-hl-6); 39 | --hl-7: var(--light-hl-7); 40 | --hl-8: var(--light-hl-8); 41 | --hl-9: var(--light-hl-9); 42 | --hl-10: var(--light-hl-10); 43 | --hl-11: var(--light-hl-11); 44 | --code-background: var(--light-code-background); 45 | } 46 | } 47 | 48 | @media (prefers-color-scheme: dark) { 49 | :root { 50 | --hl-0: var(--dark-hl-0); 51 | --hl-1: var(--dark-hl-1); 52 | --hl-2: var(--dark-hl-2); 53 | --hl-3: var(--dark-hl-3); 54 | --hl-4: var(--dark-hl-4); 55 | --hl-5: var(--dark-hl-5); 56 | --hl-6: var(--dark-hl-6); 57 | --hl-7: var(--dark-hl-7); 58 | --hl-8: var(--dark-hl-8); 59 | --hl-9: var(--dark-hl-9); 60 | --hl-10: var(--dark-hl-10); 61 | --hl-11: var(--dark-hl-11); 62 | --code-background: var(--dark-code-background); 63 | } 64 | } 65 | 66 | :root[data-theme='light'] { 67 | --hl-0: var(--light-hl-0); 68 | --hl-1: var(--light-hl-1); 69 | --hl-2: var(--light-hl-2); 70 | --hl-3: var(--light-hl-3); 71 | --hl-4: var(--light-hl-4); 72 | --hl-5: var(--light-hl-5); 73 | --hl-6: var(--light-hl-6); 74 | --hl-7: var(--light-hl-7); 75 | --hl-8: var(--light-hl-8); 76 | --hl-9: var(--light-hl-9); 77 | --hl-10: var(--light-hl-10); 78 | --hl-11: var(--light-hl-11); 79 | --code-background: var(--light-code-background); 80 | } 81 | 82 | :root[data-theme='dark'] { 83 | --hl-0: var(--dark-hl-0); 84 | --hl-1: var(--dark-hl-1); 85 | --hl-2: var(--dark-hl-2); 86 | --hl-3: var(--dark-hl-3); 87 | --hl-4: var(--dark-hl-4); 88 | --hl-5: var(--dark-hl-5); 89 | --hl-6: var(--dark-hl-6); 90 | --hl-7: var(--dark-hl-7); 91 | --hl-8: var(--dark-hl-8); 92 | --hl-9: var(--dark-hl-9); 93 | --hl-10: var(--dark-hl-10); 94 | --hl-11: var(--dark-hl-11); 95 | --code-background: var(--dark-code-background); 96 | } 97 | 98 | .hl-0 { 99 | color: var(--hl-0); 100 | } 101 | .hl-1 { 102 | color: var(--hl-1); 103 | } 104 | .hl-2 { 105 | color: var(--hl-2); 106 | } 107 | .hl-3 { 108 | color: var(--hl-3); 109 | } 110 | .hl-4 { 111 | color: var(--hl-4); 112 | } 113 | .hl-5 { 114 | color: var(--hl-5); 115 | } 116 | .hl-6 { 117 | color: var(--hl-6); 118 | } 119 | .hl-7 { 120 | color: var(--hl-7); 121 | } 122 | .hl-8 { 123 | color: var(--hl-8); 124 | } 125 | .hl-9 { 126 | color: var(--hl-9); 127 | } 128 | .hl-10 { 129 | color: var(--hl-10); 130 | } 131 | .hl-11 { 132 | color: var(--hl-11); 133 | } 134 | pre, 135 | code { 136 | background: var(--code-background); 137 | } 138 | -------------------------------------------------------------------------------- /docs/assets/icons.js: -------------------------------------------------------------------------------- 1 | ;(function () { 2 | addIcons() 3 | function addIcons() { 4 | if (document.readyState === 'loading') 5 | return document.addEventListener('DOMContentLoaded', addIcons) 6 | const svg = document.body.appendChild( 7 | document.createElementNS('http://www.w3.org/2000/svg', 'svg'), 8 | ) 9 | svg.innerHTML = `""` 10 | svg.style.display = 'none' 11 | if (location.protocol === 'file:') updateUseElements() 12 | } 13 | 14 | function updateUseElements() { 15 | document.querySelectorAll('use').forEach((el) => { 16 | if (el.getAttribute('href').includes('#icon-')) { 17 | el.setAttribute('href', el.getAttribute('href').replace(/.*#/, '#')) 18 | } 19 | }) 20 | } 21 | })() 22 | -------------------------------------------------------------------------------- /docs/assets/icons.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /docs/assets/navigation.js: -------------------------------------------------------------------------------- 1 | window.navigationData = 2 | 'data:application/octet-stream;base64,H4sIAAAAAAAAE4uuVipJrShRslJyy8wpSS1S0lEqSCzJULJSSs5JLC5OLdaHiOtllOTmKOkoZWfmpShZGRpZ1Oqg6fQvKMnMzytGGJCZV5JalJaYDDcDqgLVKCNTMySjfPKTE3N8MotLEMaUVBakFuvDJdB0G1iaG5oa1cYCAFcQPwPIAAAA' 3 | -------------------------------------------------------------------------------- /docs/assets/search.js: -------------------------------------------------------------------------------- 1 | window.searchData = 2 | 'data:application/octet-stream;base64,H4sIAAAAAAAAE6VY246bMBT8l7OvVjbH3PmAqpVWatWH7gOKVgicLioBBGQvivLvFcTEdmxYJ3mLyJmZw/F4YucAbf3eQZwc4F9R5RBTzydQpTsGMXwryp61P5u+qKsOCOzbEmIoqp612zRj3aNSsHrtdyUQyMq061gHMcCRTLS4pu6Zl+2a/vOp6Ho7zge5XmIn0KQtq3qt0xnZ0l6xvFuMfWTlPme2b3iuvkOyKdOMfa/LnLWWsiriDumW/WUflqJT7V1yY+e/r1JVIHeId01Z9NdIK4DrhOk6CtCjZ+2nOktLZef0nw3rHs/PFzeh73mO2N0vLwN2kejhXGNuW7QzM6v3us07G4nVVPmF0Ip3JOnR8CKwznqci6/J4mg8FEPO6qrr233W14tUD2rd0sJaJZJJwiKHbAPIRG8XO9fkjUnFPmXs4sWkYRMqV6WJWcQ6Q64ID5OSdWQoWeGKnVB0v9p6m1bL6y9X3aLCB/Jct7nN4HjdLUpZydJqeTfyilvY0zx/VpLKJCAV3TarXf3GvpZR65aVNgSKKmcfEB/gjbVdUVcQA105qwgIbAtW5sPZ7tQCgaze7QYCAnmd7cePG172hw0xNhSfqh/XQJI1oeEKHXezIckEHr8YH0wc4skIRCAJmoCoAVEBUiAJJdRZramvAKkGpArQAZI4JqCjAR0F6AJJXBPQ1YCuAvSAJJ4J6GlATwH6QBLfBPQ1oK8AAyBJYAIGGjBQgCGQJDQtR6gBQwUYAUkiEzDSgJFqgMEPaPQO6ubBC/eM9jH7x2Ag1UE4+AKpEaybCFUXoTPnP9R9hKqR0J2zIOpWQtVL6M25EHU3oWon9OeMiLqhUHUUBnNeRN1TqJoKwzk7om4rVH2Fg1vQMS6Sbi1UvUVHb7kmMNW9RVVv0dFbnhGse4tepNPoLd8INgSU6i062AUDI1g3F380hvsba3uW/ziFfJKcD+0HeOHJH02/MAeIID4cjyLn48NRivrhu0EnzXN+2BYk6AsWSq1o+O+txOFJHGjHIZ+gJSYqmNCum/EvgtNpWeKRaOxYpvOw4HAEh3NCoWvFteV3EakduR+7hk4k9fQPjOBaC6q1FVPRNdNRT+pIeju0c8/ljKWlonw+jh3RcKW7ZAsFW2jFMp4rX/ndQvC4gsflXXlWfPweIZgkU3ucybdkGs5x+k4LpIHZTYqfnrXWpD3r89aCawjfx+O41Jo0NWrnqvGeojUmvWLAG7NbTX1aks/RoqUNgaZoWFlUDOJkczz+B+cvdprgFAAA' 3 | -------------------------------------------------------------------------------- /docs/assets/style.css: -------------------------------------------------------------------------------- 1 | :root { 2 | /* Light */ 3 | --light-color-background: #f2f4f8; 4 | --light-color-background-secondary: #eff0f1; 5 | --light-color-warning-text: #222; 6 | --light-color-background-warning: #e6e600; 7 | --light-color-icon-background: var(--light-color-background); 8 | --light-color-accent: #c5c7c9; 9 | --light-color-active-menu-item: var(--light-color-accent); 10 | --light-color-text: #222; 11 | --light-color-text-aside: #6e6e6e; 12 | --light-color-link: #1f70c2; 13 | --light-color-focus-outline: #3584e4; 14 | 15 | --light-color-ts-keyword: #056bd6; 16 | --light-color-ts-project: #b111c9; 17 | --light-color-ts-module: var(--light-color-ts-project); 18 | --light-color-ts-namespace: var(--light-color-ts-project); 19 | --light-color-ts-enum: #7e6f15; 20 | --light-color-ts-enum-member: var(--light-color-ts-enum); 21 | --light-color-ts-variable: #4760ec; 22 | --light-color-ts-function: #572be7; 23 | --light-color-ts-class: #1f70c2; 24 | --light-color-ts-interface: #108024; 25 | --light-color-ts-constructor: var(--light-color-ts-class); 26 | --light-color-ts-property: var(--light-color-ts-variable); 27 | --light-color-ts-method: var(--light-color-ts-function); 28 | --light-color-ts-call-signature: var(--light-color-ts-method); 29 | --light-color-ts-index-signature: var(--light-color-ts-property); 30 | --light-color-ts-constructor-signature: var(--light-color-ts-constructor); 31 | --light-color-ts-parameter: var(--light-color-ts-variable); 32 | /* type literal not included as links will never be generated to it */ 33 | --light-color-ts-type-parameter: #a55c0e; 34 | --light-color-ts-accessor: var(--light-color-ts-property); 35 | --light-color-ts-get-signature: var(--light-color-ts-accessor); 36 | --light-color-ts-set-signature: var(--light-color-ts-accessor); 37 | --light-color-ts-type-alias: #d51270; 38 | /* reference not included as links will be colored with the kind that it points to */ 39 | --light-color-document: #000000; 40 | 41 | --light-external-icon: url("data:image/svg+xml;utf8,"); 42 | --light-color-scheme: light; 43 | 44 | /* Dark */ 45 | --dark-color-background: #2b2e33; 46 | --dark-color-background-secondary: #1e2024; 47 | --dark-color-background-warning: #bebe00; 48 | --dark-color-warning-text: #222; 49 | --dark-color-icon-background: var(--dark-color-background-secondary); 50 | --dark-color-accent: #9096a2; 51 | --dark-color-active-menu-item: #5d5d6a; 52 | --dark-color-text: #f5f5f5; 53 | --dark-color-text-aside: #dddddd; 54 | --dark-color-link: #00aff4; 55 | --dark-color-focus-outline: #4c97f2; 56 | 57 | --dark-color-ts-keyword: #3399ff; 58 | --dark-color-ts-project: #e358ff; 59 | --dark-color-ts-module: var(--dark-color-ts-project); 60 | --dark-color-ts-namespace: var(--dark-color-ts-project); 61 | --dark-color-ts-enum: #f4d93e; 62 | --dark-color-ts-enum-member: var(--dark-color-ts-enum); 63 | --dark-color-ts-variable: #798dff; 64 | --dark-color-ts-function: #a280ff; 65 | --dark-color-ts-class: #8ac4ff; 66 | --dark-color-ts-interface: #6cff87; 67 | --dark-color-ts-constructor: var(--dark-color-ts-class); 68 | --dark-color-ts-property: var(--dark-color-ts-variable); 69 | --dark-color-ts-method: var(--dark-color-ts-function); 70 | --dark-color-ts-call-signature: var(--dark-color-ts-method); 71 | --dark-color-ts-index-signature: var(--dark-color-ts-property); 72 | --dark-color-ts-constructor-signature: var(--dark-color-ts-constructor); 73 | --dark-color-ts-parameter: var(--dark-color-ts-variable); 74 | /* type literal not included as links will never be generated to it */ 75 | --dark-color-ts-type-parameter: #e07d13; 76 | --dark-color-ts-accessor: var(--dark-color-ts-property); 77 | --dark-color-ts-get-signature: var(--dark-color-ts-accessor); 78 | --dark-color-ts-set-signature: var(--dark-color-ts-accessor); 79 | --dark-color-ts-type-alias: #ff6492; 80 | /* reference not included as links will be colored with the kind that it points to */ 81 | --dark-color-document: #ffffff; 82 | 83 | --dark-external-icon: url("data:image/svg+xml;utf8,"); 84 | --dark-color-scheme: dark; 85 | } 86 | 87 | @media (prefers-color-scheme: light) { 88 | :root { 89 | --color-background: var(--light-color-background); 90 | --color-background-secondary: var(--light-color-background-secondary); 91 | --color-background-warning: var(--light-color-background-warning); 92 | --color-warning-text: var(--light-color-warning-text); 93 | --color-icon-background: var(--light-color-icon-background); 94 | --color-accent: var(--light-color-accent); 95 | --color-active-menu-item: var(--light-color-active-menu-item); 96 | --color-text: var(--light-color-text); 97 | --color-text-aside: var(--light-color-text-aside); 98 | --color-link: var(--light-color-link); 99 | --color-focus-outline: var(--light-color-focus-outline); 100 | 101 | --color-ts-keyword: var(--light-color-ts-keyword); 102 | --color-ts-module: var(--light-color-ts-module); 103 | --color-ts-namespace: var(--light-color-ts-namespace); 104 | --color-ts-enum: var(--light-color-ts-enum); 105 | --color-ts-enum-member: var(--light-color-ts-enum-member); 106 | --color-ts-variable: var(--light-color-ts-variable); 107 | --color-ts-function: var(--light-color-ts-function); 108 | --color-ts-class: var(--light-color-ts-class); 109 | --color-ts-interface: var(--light-color-ts-interface); 110 | --color-ts-constructor: var(--light-color-ts-constructor); 111 | --color-ts-property: var(--light-color-ts-property); 112 | --color-ts-method: var(--light-color-ts-method); 113 | --color-ts-call-signature: var(--light-color-ts-call-signature); 114 | --color-ts-index-signature: var(--light-color-ts-index-signature); 115 | --color-ts-constructor-signature: var( 116 | --light-color-ts-constructor-signature 117 | ); 118 | --color-ts-parameter: var(--light-color-ts-parameter); 119 | --color-ts-type-parameter: var(--light-color-ts-type-parameter); 120 | --color-ts-accessor: var(--light-color-ts-accessor); 121 | --color-ts-get-signature: var(--light-color-ts-get-signature); 122 | --color-ts-set-signature: var(--light-color-ts-set-signature); 123 | --color-ts-type-alias: var(--light-color-ts-type-alias); 124 | --color-document: var(--light-color-document); 125 | 126 | --external-icon: var(--light-external-icon); 127 | --color-scheme: var(--light-color-scheme); 128 | } 129 | } 130 | 131 | @media (prefers-color-scheme: dark) { 132 | :root { 133 | --color-background: var(--dark-color-background); 134 | --color-background-secondary: var(--dark-color-background-secondary); 135 | --color-background-warning: var(--dark-color-background-warning); 136 | --color-warning-text: var(--dark-color-warning-text); 137 | --color-icon-background: var(--dark-color-icon-background); 138 | --color-accent: var(--dark-color-accent); 139 | --color-active-menu-item: var(--dark-color-active-menu-item); 140 | --color-text: var(--dark-color-text); 141 | --color-text-aside: var(--dark-color-text-aside); 142 | --color-link: var(--dark-color-link); 143 | --color-focus-outline: var(--dark-color-focus-outline); 144 | 145 | --color-ts-keyword: var(--dark-color-ts-keyword); 146 | --color-ts-module: var(--dark-color-ts-module); 147 | --color-ts-namespace: var(--dark-color-ts-namespace); 148 | --color-ts-enum: var(--dark-color-ts-enum); 149 | --color-ts-enum-member: var(--dark-color-ts-enum-member); 150 | --color-ts-variable: var(--dark-color-ts-variable); 151 | --color-ts-function: var(--dark-color-ts-function); 152 | --color-ts-class: var(--dark-color-ts-class); 153 | --color-ts-interface: var(--dark-color-ts-interface); 154 | --color-ts-constructor: var(--dark-color-ts-constructor); 155 | --color-ts-property: var(--dark-color-ts-property); 156 | --color-ts-method: var(--dark-color-ts-method); 157 | --color-ts-call-signature: var(--dark-color-ts-call-signature); 158 | --color-ts-index-signature: var(--dark-color-ts-index-signature); 159 | --color-ts-constructor-signature: var( 160 | --dark-color-ts-constructor-signature 161 | ); 162 | --color-ts-parameter: var(--dark-color-ts-parameter); 163 | --color-ts-type-parameter: var(--dark-color-ts-type-parameter); 164 | --color-ts-accessor: var(--dark-color-ts-accessor); 165 | --color-ts-get-signature: var(--dark-color-ts-get-signature); 166 | --color-ts-set-signature: var(--dark-color-ts-set-signature); 167 | --color-ts-type-alias: var(--dark-color-ts-type-alias); 168 | --color-document: var(--dark-color-document); 169 | 170 | --external-icon: var(--dark-external-icon); 171 | --color-scheme: var(--dark-color-scheme); 172 | } 173 | } 174 | 175 | html { 176 | color-scheme: var(--color-scheme); 177 | } 178 | 179 | body { 180 | margin: 0; 181 | } 182 | 183 | :root[data-theme='light'] { 184 | --color-background: var(--light-color-background); 185 | --color-background-secondary: var(--light-color-background-secondary); 186 | --color-background-warning: var(--light-color-background-warning); 187 | --color-warning-text: var(--light-color-warning-text); 188 | --color-icon-background: var(--light-color-icon-background); 189 | --color-accent: var(--light-color-accent); 190 | --color-active-menu-item: var(--light-color-active-menu-item); 191 | --color-text: var(--light-color-text); 192 | --color-text-aside: var(--light-color-text-aside); 193 | --color-link: var(--light-color-link); 194 | --color-focus-outline: var(--light-color-focus-outline); 195 | 196 | --color-ts-keyword: var(--light-color-ts-keyword); 197 | --color-ts-module: var(--light-color-ts-module); 198 | --color-ts-namespace: var(--light-color-ts-namespace); 199 | --color-ts-enum: var(--light-color-ts-enum); 200 | --color-ts-enum-member: var(--light-color-ts-enum-member); 201 | --color-ts-variable: var(--light-color-ts-variable); 202 | --color-ts-function: var(--light-color-ts-function); 203 | --color-ts-class: var(--light-color-ts-class); 204 | --color-ts-interface: var(--light-color-ts-interface); 205 | --color-ts-constructor: var(--light-color-ts-constructor); 206 | --color-ts-property: var(--light-color-ts-property); 207 | --color-ts-method: var(--light-color-ts-method); 208 | --color-ts-call-signature: var(--light-color-ts-call-signature); 209 | --color-ts-index-signature: var(--light-color-ts-index-signature); 210 | --color-ts-constructor-signature: var(--light-color-ts-constructor-signature); 211 | --color-ts-parameter: var(--light-color-ts-parameter); 212 | --color-ts-type-parameter: var(--light-color-ts-type-parameter); 213 | --color-ts-accessor: var(--light-color-ts-accessor); 214 | --color-ts-get-signature: var(--light-color-ts-get-signature); 215 | --color-ts-set-signature: var(--light-color-ts-set-signature); 216 | --color-ts-type-alias: var(--light-color-ts-type-alias); 217 | --color-document: var(--light-color-document); 218 | 219 | --external-icon: var(--light-external-icon); 220 | --color-scheme: var(--light-color-scheme); 221 | } 222 | 223 | :root[data-theme='dark'] { 224 | --color-background: var(--dark-color-background); 225 | --color-background-secondary: var(--dark-color-background-secondary); 226 | --color-background-warning: var(--dark-color-background-warning); 227 | --color-warning-text: var(--dark-color-warning-text); 228 | --color-icon-background: var(--dark-color-icon-background); 229 | --color-accent: var(--dark-color-accent); 230 | --color-active-menu-item: var(--dark-color-active-menu-item); 231 | --color-text: var(--dark-color-text); 232 | --color-text-aside: var(--dark-color-text-aside); 233 | --color-link: var(--dark-color-link); 234 | --color-focus-outline: var(--dark-color-focus-outline); 235 | 236 | --color-ts-keyword: var(--dark-color-ts-keyword); 237 | --color-ts-module: var(--dark-color-ts-module); 238 | --color-ts-namespace: var(--dark-color-ts-namespace); 239 | --color-ts-enum: var(--dark-color-ts-enum); 240 | --color-ts-enum-member: var(--dark-color-ts-enum-member); 241 | --color-ts-variable: var(--dark-color-ts-variable); 242 | --color-ts-function: var(--dark-color-ts-function); 243 | --color-ts-class: var(--dark-color-ts-class); 244 | --color-ts-interface: var(--dark-color-ts-interface); 245 | --color-ts-constructor: var(--dark-color-ts-constructor); 246 | --color-ts-property: var(--dark-color-ts-property); 247 | --color-ts-method: var(--dark-color-ts-method); 248 | --color-ts-call-signature: var(--dark-color-ts-call-signature); 249 | --color-ts-index-signature: var(--dark-color-ts-index-signature); 250 | --color-ts-constructor-signature: var(--dark-color-ts-constructor-signature); 251 | --color-ts-parameter: var(--dark-color-ts-parameter); 252 | --color-ts-type-parameter: var(--dark-color-ts-type-parameter); 253 | --color-ts-accessor: var(--dark-color-ts-accessor); 254 | --color-ts-get-signature: var(--dark-color-ts-get-signature); 255 | --color-ts-set-signature: var(--dark-color-ts-set-signature); 256 | --color-ts-type-alias: var(--dark-color-ts-type-alias); 257 | --color-document: var(--dark-color-document); 258 | 259 | --external-icon: var(--dark-external-icon); 260 | --color-scheme: var(--dark-color-scheme); 261 | } 262 | 263 | *:focus-visible, 264 | .tsd-accordion-summary:focus-visible svg { 265 | outline: 2px solid var(--color-focus-outline); 266 | } 267 | 268 | .always-visible, 269 | .always-visible .tsd-signatures { 270 | display: inherit !important; 271 | } 272 | 273 | h1, 274 | h2, 275 | h3, 276 | h4, 277 | h5, 278 | h6 { 279 | line-height: 1.2; 280 | } 281 | 282 | h1 { 283 | font-size: 1.875rem; 284 | margin: 0.67rem 0; 285 | } 286 | 287 | h2 { 288 | font-size: 1.5rem; 289 | margin: 0.83rem 0; 290 | } 291 | 292 | h3 { 293 | font-size: 1.25rem; 294 | margin: 1rem 0; 295 | } 296 | 297 | h4 { 298 | font-size: 1.05rem; 299 | margin: 1.33rem 0; 300 | } 301 | 302 | h5 { 303 | font-size: 1rem; 304 | margin: 1.5rem 0; 305 | } 306 | 307 | h6 { 308 | font-size: 0.875rem; 309 | margin: 2.33rem 0; 310 | } 311 | 312 | dl, 313 | menu, 314 | ol, 315 | ul { 316 | margin: 1em 0; 317 | } 318 | 319 | dd { 320 | margin: 0 0 0 40px; 321 | } 322 | 323 | .container { 324 | max-width: 1700px; 325 | padding: 0 2rem; 326 | } 327 | 328 | /* Footer */ 329 | footer { 330 | border-top: 1px solid var(--color-accent); 331 | padding-top: 1rem; 332 | padding-bottom: 1rem; 333 | max-height: 3.5rem; 334 | } 335 | footer > p { 336 | margin: 0 1em; 337 | } 338 | 339 | .container-main { 340 | margin: 0 auto; 341 | /* toolbar, footer, margin */ 342 | min-height: calc(100vh - 41px - 56px - 4rem); 343 | } 344 | 345 | @keyframes fade-in { 346 | from { 347 | opacity: 0; 348 | } 349 | to { 350 | opacity: 1; 351 | } 352 | } 353 | @keyframes fade-out { 354 | from { 355 | opacity: 1; 356 | visibility: visible; 357 | } 358 | to { 359 | opacity: 0; 360 | } 361 | } 362 | @keyframes fade-in-delayed { 363 | 0% { 364 | opacity: 0; 365 | } 366 | 33% { 367 | opacity: 0; 368 | } 369 | 100% { 370 | opacity: 1; 371 | } 372 | } 373 | @keyframes fade-out-delayed { 374 | 0% { 375 | opacity: 1; 376 | visibility: visible; 377 | } 378 | 66% { 379 | opacity: 0; 380 | } 381 | 100% { 382 | opacity: 0; 383 | } 384 | } 385 | @keyframes pop-in-from-right { 386 | from { 387 | transform: translate(100%, 0); 388 | } 389 | to { 390 | transform: translate(0, 0); 391 | } 392 | } 393 | @keyframes pop-out-to-right { 394 | from { 395 | transform: translate(0, 0); 396 | visibility: visible; 397 | } 398 | to { 399 | transform: translate(100%, 0); 400 | } 401 | } 402 | body { 403 | background: var(--color-background); 404 | font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Noto Sans', 405 | Helvetica, Arial, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji'; 406 | font-size: 16px; 407 | color: var(--color-text); 408 | } 409 | 410 | a { 411 | color: var(--color-link); 412 | text-decoration: none; 413 | } 414 | a:hover { 415 | text-decoration: underline; 416 | } 417 | a.external[target='_blank'] { 418 | background-image: var(--external-icon); 419 | background-position: top 3px right; 420 | background-repeat: no-repeat; 421 | padding-right: 13px; 422 | } 423 | a.tsd-anchor-link { 424 | color: var(--color-text); 425 | } 426 | 427 | code, 428 | pre { 429 | font-family: Menlo, Monaco, Consolas, 'Courier New', monospace; 430 | padding: 0.2em; 431 | margin: 0; 432 | font-size: 0.875rem; 433 | border-radius: 0.8em; 434 | } 435 | 436 | pre { 437 | position: relative; 438 | white-space: pre; 439 | white-space: pre-wrap; 440 | word-wrap: break-word; 441 | padding: 10px; 442 | border: 1px solid var(--color-accent); 443 | } 444 | pre code { 445 | padding: 0; 446 | font-size: 100%; 447 | } 448 | pre > button { 449 | position: absolute; 450 | top: 10px; 451 | right: 10px; 452 | opacity: 0; 453 | transition: opacity 0.1s; 454 | box-sizing: border-box; 455 | } 456 | pre:hover > button, 457 | pre > button.visible { 458 | opacity: 1; 459 | } 460 | 461 | blockquote { 462 | margin: 1em 0; 463 | padding-left: 1em; 464 | border-left: 4px solid gray; 465 | } 466 | 467 | .tsd-typography { 468 | line-height: 1.333em; 469 | } 470 | .tsd-typography ul { 471 | list-style: square; 472 | padding: 0 0 0 20px; 473 | margin: 0; 474 | } 475 | .tsd-typography .tsd-index-panel h3, 476 | .tsd-index-panel .tsd-typography h3, 477 | .tsd-typography h4, 478 | .tsd-typography h5, 479 | .tsd-typography h6 { 480 | font-size: 1em; 481 | } 482 | .tsd-typography h5, 483 | .tsd-typography h6 { 484 | font-weight: normal; 485 | } 486 | .tsd-typography p, 487 | .tsd-typography ul, 488 | .tsd-typography ol { 489 | margin: 1em 0; 490 | } 491 | .tsd-typography table { 492 | border-collapse: collapse; 493 | border: none; 494 | } 495 | .tsd-typography td, 496 | .tsd-typography th { 497 | padding: 6px 13px; 498 | border: 1px solid var(--color-accent); 499 | } 500 | .tsd-typography thead, 501 | .tsd-typography tr:nth-child(even) { 502 | background-color: var(--color-background-secondary); 503 | } 504 | 505 | .tsd-breadcrumb { 506 | margin: 0; 507 | padding: 0; 508 | color: var(--color-text-aside); 509 | } 510 | .tsd-breadcrumb a { 511 | color: var(--color-text-aside); 512 | text-decoration: none; 513 | } 514 | .tsd-breadcrumb a:hover { 515 | text-decoration: underline; 516 | } 517 | .tsd-breadcrumb li { 518 | display: inline; 519 | } 520 | .tsd-breadcrumb li:after { 521 | content: ' / '; 522 | } 523 | 524 | .tsd-comment-tags { 525 | display: flex; 526 | flex-direction: column; 527 | } 528 | dl.tsd-comment-tag-group { 529 | display: flex; 530 | align-items: center; 531 | overflow: hidden; 532 | margin: 0.5em 0; 533 | } 534 | dl.tsd-comment-tag-group dt { 535 | display: flex; 536 | margin-right: 0.5em; 537 | font-size: 0.875em; 538 | font-weight: normal; 539 | } 540 | dl.tsd-comment-tag-group dd { 541 | margin: 0; 542 | } 543 | code.tsd-tag { 544 | padding: 0.25em 0.4em; 545 | border: 0.1em solid var(--color-accent); 546 | margin-right: 0.25em; 547 | font-size: 70%; 548 | } 549 | h1 code.tsd-tag:first-of-type { 550 | margin-left: 0.25em; 551 | } 552 | 553 | dl.tsd-comment-tag-group dd:before, 554 | dl.tsd-comment-tag-group dd:after { 555 | content: ' '; 556 | } 557 | dl.tsd-comment-tag-group dd pre, 558 | dl.tsd-comment-tag-group dd:after { 559 | clear: both; 560 | } 561 | dl.tsd-comment-tag-group p { 562 | margin: 0; 563 | } 564 | 565 | .tsd-panel.tsd-comment .lead { 566 | font-size: 1.1em; 567 | line-height: 1.333em; 568 | margin-bottom: 2em; 569 | } 570 | .tsd-panel.tsd-comment .lead:last-child { 571 | margin-bottom: 0; 572 | } 573 | 574 | .tsd-filter-visibility h4 { 575 | font-size: 1rem; 576 | padding-top: 0.75rem; 577 | padding-bottom: 0.5rem; 578 | margin: 0; 579 | } 580 | .tsd-filter-item:not(:last-child) { 581 | margin-bottom: 0.5rem; 582 | } 583 | .tsd-filter-input { 584 | display: flex; 585 | width: -moz-fit-content; 586 | width: fit-content; 587 | align-items: center; 588 | -webkit-user-select: none; 589 | -moz-user-select: none; 590 | -ms-user-select: none; 591 | user-select: none; 592 | cursor: pointer; 593 | } 594 | .tsd-filter-input input[type='checkbox'] { 595 | cursor: pointer; 596 | position: absolute; 597 | width: 1.5em; 598 | height: 1.5em; 599 | opacity: 0; 600 | } 601 | .tsd-filter-input input[type='checkbox']:disabled { 602 | pointer-events: none; 603 | } 604 | .tsd-filter-input svg { 605 | cursor: pointer; 606 | width: 1.5em; 607 | height: 1.5em; 608 | margin-right: 0.5em; 609 | border-radius: 0.33em; 610 | /* Leaving this at full opacity breaks event listeners on Firefox. 611 | Don't remove unless you know what you're doing. */ 612 | opacity: 0.99; 613 | } 614 | .tsd-filter-input input[type='checkbox']:focus-visible + svg { 615 | outline: 2px solid var(--color-focus-outline); 616 | } 617 | .tsd-checkbox-background { 618 | fill: var(--color-accent); 619 | } 620 | input[type='checkbox']:checked ~ svg .tsd-checkbox-checkmark { 621 | stroke: var(--color-text); 622 | } 623 | .tsd-filter-input input:disabled ~ svg > .tsd-checkbox-background { 624 | fill: var(--color-background); 625 | stroke: var(--color-accent); 626 | stroke-width: 0.25rem; 627 | } 628 | .tsd-filter-input input:disabled ~ svg > .tsd-checkbox-checkmark { 629 | stroke: var(--color-accent); 630 | } 631 | 632 | .settings-label { 633 | font-weight: bold; 634 | text-transform: uppercase; 635 | display: inline-block; 636 | } 637 | 638 | .tsd-filter-visibility .settings-label { 639 | margin: 0.75rem 0 0.5rem 0; 640 | } 641 | 642 | .tsd-theme-toggle .settings-label { 643 | margin: 0.75rem 0.75rem 0 0; 644 | } 645 | 646 | .tsd-hierarchy { 647 | list-style: square; 648 | margin: 0; 649 | } 650 | .tsd-hierarchy .target { 651 | font-weight: bold; 652 | } 653 | 654 | .tsd-full-hierarchy:not(:last-child) { 655 | margin-bottom: 1em; 656 | padding-bottom: 1em; 657 | border-bottom: 1px solid var(--color-accent); 658 | } 659 | .tsd-full-hierarchy, 660 | .tsd-full-hierarchy ul { 661 | list-style: none; 662 | margin: 0; 663 | padding: 0; 664 | } 665 | .tsd-full-hierarchy ul { 666 | padding-left: 1.5rem; 667 | } 668 | .tsd-full-hierarchy a { 669 | padding: 0.25rem 0 !important; 670 | font-size: 1rem; 671 | display: inline-flex; 672 | align-items: center; 673 | color: var(--color-text); 674 | } 675 | 676 | .tsd-panel-group.tsd-index-group { 677 | margin-bottom: 0; 678 | } 679 | .tsd-index-panel .tsd-index-list { 680 | list-style: none; 681 | line-height: 1.333em; 682 | margin: 0; 683 | padding: 0.25rem 0 0 0; 684 | overflow: hidden; 685 | display: grid; 686 | grid-template-columns: repeat(3, 1fr); 687 | column-gap: 1rem; 688 | grid-template-rows: auto; 689 | } 690 | @media (max-width: 1024px) { 691 | .tsd-index-panel .tsd-index-list { 692 | grid-template-columns: repeat(2, 1fr); 693 | } 694 | } 695 | @media (max-width: 768px) { 696 | .tsd-index-panel .tsd-index-list { 697 | grid-template-columns: repeat(1, 1fr); 698 | } 699 | } 700 | .tsd-index-panel .tsd-index-list li { 701 | -webkit-page-break-inside: avoid; 702 | -moz-page-break-inside: avoid; 703 | -ms-page-break-inside: avoid; 704 | -o-page-break-inside: avoid; 705 | page-break-inside: avoid; 706 | } 707 | 708 | .tsd-flag { 709 | display: inline-block; 710 | padding: 0.25em 0.4em; 711 | border-radius: 4px; 712 | color: var(--color-comment-tag-text); 713 | background-color: var(--color-comment-tag); 714 | text-indent: 0; 715 | font-size: 75%; 716 | line-height: 1; 717 | font-weight: normal; 718 | } 719 | 720 | .tsd-anchor { 721 | position: relative; 722 | top: -100px; 723 | } 724 | 725 | .tsd-member { 726 | position: relative; 727 | } 728 | .tsd-member .tsd-anchor + h3 { 729 | display: flex; 730 | align-items: center; 731 | margin-top: 0; 732 | margin-bottom: 0; 733 | border-bottom: none; 734 | } 735 | 736 | .tsd-navigation.settings { 737 | margin: 1rem 0; 738 | } 739 | .tsd-navigation > a, 740 | .tsd-navigation .tsd-accordion-summary { 741 | width: calc(100% - 0.25rem); 742 | display: flex; 743 | align-items: center; 744 | } 745 | .tsd-navigation a, 746 | .tsd-navigation summary > span, 747 | .tsd-page-navigation a { 748 | display: flex; 749 | width: calc(100% - 0.25rem); 750 | align-items: center; 751 | padding: 0.25rem; 752 | color: var(--color-text); 753 | text-decoration: none; 754 | box-sizing: border-box; 755 | } 756 | .tsd-navigation a.current, 757 | .tsd-page-navigation a.current { 758 | background: var(--color-active-menu-item); 759 | } 760 | .tsd-navigation a:hover, 761 | .tsd-page-navigation a:hover { 762 | text-decoration: underline; 763 | } 764 | .tsd-navigation ul, 765 | .tsd-page-navigation ul { 766 | margin-top: 0; 767 | margin-bottom: 0; 768 | padding: 0; 769 | list-style: none; 770 | } 771 | .tsd-navigation li, 772 | .tsd-page-navigation li { 773 | padding: 0; 774 | max-width: 100%; 775 | } 776 | .tsd-navigation .tsd-nav-link { 777 | display: none; 778 | } 779 | .tsd-nested-navigation { 780 | margin-left: 3rem; 781 | } 782 | .tsd-nested-navigation > li > details { 783 | margin-left: -1.5rem; 784 | } 785 | .tsd-small-nested-navigation { 786 | margin-left: 1.5rem; 787 | } 788 | .tsd-small-nested-navigation > li > details { 789 | margin-left: -1.5rem; 790 | } 791 | 792 | .tsd-page-navigation-section { 793 | margin-left: 10px; 794 | } 795 | .tsd-page-navigation-section > summary { 796 | padding: 0.25rem; 797 | } 798 | .tsd-page-navigation-section > div { 799 | margin-left: 20px; 800 | } 801 | .tsd-page-navigation ul { 802 | padding-left: 1.75rem; 803 | } 804 | 805 | #tsd-sidebar-links a { 806 | margin-top: 0; 807 | margin-bottom: 0.5rem; 808 | line-height: 1.25rem; 809 | } 810 | #tsd-sidebar-links a:last-of-type { 811 | margin-bottom: 0; 812 | } 813 | 814 | a.tsd-index-link { 815 | padding: 0.25rem 0 !important; 816 | font-size: 1rem; 817 | line-height: 1.25rem; 818 | display: inline-flex; 819 | align-items: center; 820 | color: var(--color-text); 821 | } 822 | .tsd-accordion-summary { 823 | list-style-type: none; /* hide marker on non-safari */ 824 | outline: none; /* broken on safari, so just hide it */ 825 | } 826 | .tsd-accordion-summary::-webkit-details-marker { 827 | display: none; /* hide marker on safari */ 828 | } 829 | .tsd-accordion-summary, 830 | .tsd-accordion-summary a { 831 | -moz-user-select: none; 832 | -webkit-user-select: none; 833 | -ms-user-select: none; 834 | user-select: none; 835 | 836 | cursor: pointer; 837 | } 838 | .tsd-accordion-summary a { 839 | width: calc(100% - 1.5rem); 840 | } 841 | .tsd-accordion-summary > * { 842 | margin-top: 0; 843 | margin-bottom: 0; 844 | padding-top: 0; 845 | padding-bottom: 0; 846 | } 847 | .tsd-accordion .tsd-accordion-summary > svg { 848 | margin-left: 0.25rem; 849 | vertical-align: text-top; 850 | } 851 | .tsd-index-content > :not(:first-child) { 852 | margin-top: 0.75rem; 853 | } 854 | .tsd-index-heading { 855 | margin-top: 1.5rem; 856 | margin-bottom: 0.75rem; 857 | } 858 | 859 | .tsd-kind-icon { 860 | margin-right: 0.5rem; 861 | width: 1.25rem; 862 | height: 1.25rem; 863 | min-width: 1.25rem; 864 | min-height: 1.25rem; 865 | } 866 | .tsd-kind-icon path { 867 | transform-origin: center; 868 | transform: scale(1.1); 869 | } 870 | .tsd-signature > .tsd-kind-icon { 871 | margin-right: 0.8rem; 872 | } 873 | 874 | .tsd-panel { 875 | margin-bottom: 2.5rem; 876 | } 877 | .tsd-panel.tsd-member { 878 | margin-bottom: 4rem; 879 | } 880 | .tsd-panel:empty { 881 | display: none; 882 | } 883 | .tsd-panel > h1, 884 | .tsd-panel > h2, 885 | .tsd-panel > h3 { 886 | margin: 1.5rem -1.5rem 0.75rem -1.5rem; 887 | padding: 0 1.5rem 0.75rem 1.5rem; 888 | } 889 | .tsd-panel > h1.tsd-before-signature, 890 | .tsd-panel > h2.tsd-before-signature, 891 | .tsd-panel > h3.tsd-before-signature { 892 | margin-bottom: 0; 893 | border-bottom: none; 894 | } 895 | 896 | .tsd-panel-group { 897 | margin: 2rem 0; 898 | } 899 | .tsd-panel-group.tsd-index-group { 900 | margin: 2rem 0; 901 | } 902 | .tsd-panel-group.tsd-index-group details { 903 | margin: 2rem 0; 904 | } 905 | .tsd-panel-group > .tsd-accordion-summary { 906 | margin-bottom: 1rem; 907 | } 908 | 909 | #tsd-search { 910 | transition: background-color 0.2s; 911 | } 912 | #tsd-search .title { 913 | position: relative; 914 | z-index: 2; 915 | } 916 | #tsd-search .field { 917 | position: absolute; 918 | left: 0; 919 | top: 0; 920 | right: 2.5rem; 921 | height: 100%; 922 | } 923 | #tsd-search .field input { 924 | box-sizing: border-box; 925 | position: relative; 926 | top: -50px; 927 | z-index: 1; 928 | width: 100%; 929 | padding: 0 10px; 930 | opacity: 0; 931 | outline: 0; 932 | border: 0; 933 | background: transparent; 934 | color: var(--color-text); 935 | } 936 | #tsd-search .field label { 937 | position: absolute; 938 | overflow: hidden; 939 | right: -40px; 940 | } 941 | #tsd-search .field input, 942 | #tsd-search .title, 943 | #tsd-toolbar-links a { 944 | transition: opacity 0.2s; 945 | } 946 | #tsd-search .results { 947 | position: absolute; 948 | visibility: hidden; 949 | top: 40px; 950 | width: 100%; 951 | margin: 0; 952 | padding: 0; 953 | list-style: none; 954 | box-shadow: 0 0 4px rgba(0, 0, 0, 0.25); 955 | } 956 | #tsd-search .results li { 957 | background-color: var(--color-background); 958 | line-height: initial; 959 | padding: 4px; 960 | } 961 | #tsd-search .results li:nth-child(even) { 962 | background-color: var(--color-background-secondary); 963 | } 964 | #tsd-search .results li.state { 965 | display: none; 966 | } 967 | #tsd-search .results li.current:not(.no-results), 968 | #tsd-search .results li:hover:not(.no-results) { 969 | background-color: var(--color-accent); 970 | } 971 | #tsd-search .results a { 972 | display: flex; 973 | align-items: center; 974 | padding: 0.25rem; 975 | box-sizing: border-box; 976 | } 977 | #tsd-search .results a:before { 978 | top: 10px; 979 | } 980 | #tsd-search .results span.parent { 981 | color: var(--color-text-aside); 982 | font-weight: normal; 983 | } 984 | #tsd-search.has-focus { 985 | background-color: var(--color-accent); 986 | } 987 | #tsd-search.has-focus .field input { 988 | top: 0; 989 | opacity: 1; 990 | } 991 | #tsd-search.has-focus .title, 992 | #tsd-search.has-focus #tsd-toolbar-links a { 993 | z-index: 0; 994 | opacity: 0; 995 | } 996 | #tsd-search.has-focus .results { 997 | visibility: visible; 998 | } 999 | #tsd-search.loading .results li.state.loading { 1000 | display: block; 1001 | } 1002 | #tsd-search.failure .results li.state.failure { 1003 | display: block; 1004 | } 1005 | 1006 | #tsd-toolbar-links { 1007 | position: absolute; 1008 | top: 0; 1009 | right: 2rem; 1010 | height: 100%; 1011 | display: flex; 1012 | align-items: center; 1013 | justify-content: flex-end; 1014 | } 1015 | #tsd-toolbar-links a { 1016 | margin-left: 1.5rem; 1017 | } 1018 | #tsd-toolbar-links a:hover { 1019 | text-decoration: underline; 1020 | } 1021 | 1022 | .tsd-signature { 1023 | margin: 0 0 1rem 0; 1024 | padding: 1rem 0.5rem; 1025 | border: 1px solid var(--color-accent); 1026 | font-family: Menlo, Monaco, Consolas, 'Courier New', monospace; 1027 | font-size: 14px; 1028 | overflow-x: auto; 1029 | } 1030 | 1031 | .tsd-signature-keyword { 1032 | color: var(--color-ts-keyword); 1033 | font-weight: normal; 1034 | } 1035 | 1036 | .tsd-signature-symbol { 1037 | color: var(--color-text-aside); 1038 | font-weight: normal; 1039 | } 1040 | 1041 | .tsd-signature-type { 1042 | font-style: italic; 1043 | font-weight: normal; 1044 | } 1045 | 1046 | .tsd-signatures { 1047 | padding: 0; 1048 | margin: 0 0 1em 0; 1049 | list-style-type: none; 1050 | } 1051 | .tsd-signatures .tsd-signature { 1052 | margin: 0; 1053 | border-color: var(--color-accent); 1054 | border-width: 1px 0; 1055 | transition: background-color 0.1s; 1056 | } 1057 | .tsd-signatures .tsd-index-signature:not(:last-child) { 1058 | margin-bottom: 1em; 1059 | } 1060 | .tsd-signatures .tsd-index-signature .tsd-signature { 1061 | border-width: 1px; 1062 | } 1063 | .tsd-description .tsd-signatures .tsd-signature { 1064 | border-width: 1px; 1065 | } 1066 | 1067 | ul.tsd-parameter-list, 1068 | ul.tsd-type-parameter-list { 1069 | list-style: square; 1070 | margin: 0; 1071 | padding-left: 20px; 1072 | } 1073 | ul.tsd-parameter-list > li.tsd-parameter-signature, 1074 | ul.tsd-type-parameter-list > li.tsd-parameter-signature { 1075 | list-style: none; 1076 | margin-left: -20px; 1077 | } 1078 | ul.tsd-parameter-list h5, 1079 | ul.tsd-type-parameter-list h5 { 1080 | font-size: 16px; 1081 | margin: 1em 0 0.5em 0; 1082 | } 1083 | .tsd-sources { 1084 | margin-top: 1rem; 1085 | font-size: 0.875em; 1086 | } 1087 | .tsd-sources a { 1088 | color: var(--color-text-aside); 1089 | text-decoration: underline; 1090 | } 1091 | .tsd-sources ul { 1092 | list-style: none; 1093 | padding: 0; 1094 | } 1095 | 1096 | .tsd-page-toolbar { 1097 | position: sticky; 1098 | z-index: 1; 1099 | top: 0; 1100 | left: 0; 1101 | width: 100%; 1102 | color: var(--color-text); 1103 | background: var(--color-background-secondary); 1104 | border-bottom: 1px var(--color-accent) solid; 1105 | transition: transform 0.3s ease-in-out; 1106 | } 1107 | .tsd-page-toolbar a { 1108 | color: var(--color-text); 1109 | text-decoration: none; 1110 | } 1111 | .tsd-page-toolbar a.title { 1112 | font-weight: bold; 1113 | } 1114 | .tsd-page-toolbar a.title:hover { 1115 | text-decoration: underline; 1116 | } 1117 | .tsd-page-toolbar .tsd-toolbar-contents { 1118 | display: flex; 1119 | justify-content: space-between; 1120 | height: 2.5rem; 1121 | margin: 0 auto; 1122 | } 1123 | .tsd-page-toolbar .table-cell { 1124 | position: relative; 1125 | white-space: nowrap; 1126 | line-height: 40px; 1127 | } 1128 | .tsd-page-toolbar .table-cell:first-child { 1129 | width: 100%; 1130 | } 1131 | .tsd-page-toolbar .tsd-toolbar-icon { 1132 | box-sizing: border-box; 1133 | line-height: 0; 1134 | padding: 12px 0; 1135 | } 1136 | 1137 | .tsd-widget { 1138 | display: inline-block; 1139 | overflow: hidden; 1140 | opacity: 0.8; 1141 | height: 40px; 1142 | transition: 1143 | opacity 0.1s, 1144 | background-color 0.2s; 1145 | vertical-align: bottom; 1146 | cursor: pointer; 1147 | } 1148 | .tsd-widget:hover { 1149 | opacity: 0.9; 1150 | } 1151 | .tsd-widget.active { 1152 | opacity: 1; 1153 | background-color: var(--color-accent); 1154 | } 1155 | .tsd-widget.no-caption { 1156 | width: 40px; 1157 | } 1158 | .tsd-widget.no-caption:before { 1159 | margin: 0; 1160 | } 1161 | 1162 | .tsd-widget.options, 1163 | .tsd-widget.menu { 1164 | display: none; 1165 | } 1166 | input[type='checkbox'] + .tsd-widget:before { 1167 | background-position: -120px 0; 1168 | } 1169 | input[type='checkbox']:checked + .tsd-widget:before { 1170 | background-position: -160px 0; 1171 | } 1172 | 1173 | img { 1174 | max-width: 100%; 1175 | } 1176 | 1177 | .tsd-anchor-icon { 1178 | display: inline-flex; 1179 | align-items: center; 1180 | margin-left: 0.5rem; 1181 | vertical-align: middle; 1182 | color: var(--color-text); 1183 | } 1184 | 1185 | .tsd-anchor-icon svg { 1186 | width: 1em; 1187 | height: 1em; 1188 | visibility: hidden; 1189 | } 1190 | 1191 | .tsd-anchor-link:hover > .tsd-anchor-icon svg { 1192 | visibility: visible; 1193 | } 1194 | 1195 | .deprecated { 1196 | text-decoration: line-through !important; 1197 | } 1198 | 1199 | .warning { 1200 | padding: 1rem; 1201 | color: var(--color-warning-text); 1202 | background: var(--color-background-warning); 1203 | } 1204 | 1205 | .tsd-kind-project { 1206 | color: var(--color-ts-project); 1207 | } 1208 | .tsd-kind-module { 1209 | color: var(--color-ts-module); 1210 | } 1211 | .tsd-kind-namespace { 1212 | color: var(--color-ts-namespace); 1213 | } 1214 | .tsd-kind-enum { 1215 | color: var(--color-ts-enum); 1216 | } 1217 | .tsd-kind-enum-member { 1218 | color: var(--color-ts-enum-member); 1219 | } 1220 | .tsd-kind-variable { 1221 | color: var(--color-ts-variable); 1222 | } 1223 | .tsd-kind-function { 1224 | color: var(--color-ts-function); 1225 | } 1226 | .tsd-kind-class { 1227 | color: var(--color-ts-class); 1228 | } 1229 | .tsd-kind-interface { 1230 | color: var(--color-ts-interface); 1231 | } 1232 | .tsd-kind-constructor { 1233 | color: var(--color-ts-constructor); 1234 | } 1235 | .tsd-kind-property { 1236 | color: var(--color-ts-property); 1237 | } 1238 | .tsd-kind-method { 1239 | color: var(--color-ts-method); 1240 | } 1241 | .tsd-kind-call-signature { 1242 | color: var(--color-ts-call-signature); 1243 | } 1244 | .tsd-kind-index-signature { 1245 | color: var(--color-ts-index-signature); 1246 | } 1247 | .tsd-kind-constructor-signature { 1248 | color: var(--color-ts-constructor-signature); 1249 | } 1250 | .tsd-kind-parameter { 1251 | color: var(--color-ts-parameter); 1252 | } 1253 | .tsd-kind-type-literal { 1254 | color: var(--color-ts-type-literal); 1255 | } 1256 | .tsd-kind-type-parameter { 1257 | color: var(--color-ts-type-parameter); 1258 | } 1259 | .tsd-kind-accessor { 1260 | color: var(--color-ts-accessor); 1261 | } 1262 | .tsd-kind-get-signature { 1263 | color: var(--color-ts-get-signature); 1264 | } 1265 | .tsd-kind-set-signature { 1266 | color: var(--color-ts-set-signature); 1267 | } 1268 | .tsd-kind-type-alias { 1269 | color: var(--color-ts-type-alias); 1270 | } 1271 | 1272 | /* if we have a kind icon, don't color the text by kind */ 1273 | .tsd-kind-icon ~ span { 1274 | color: var(--color-text); 1275 | } 1276 | 1277 | * { 1278 | scrollbar-width: thin; 1279 | scrollbar-color: var(--color-accent) var(--color-icon-background); 1280 | } 1281 | 1282 | *::-webkit-scrollbar { 1283 | width: 0.75rem; 1284 | } 1285 | 1286 | *::-webkit-scrollbar-track { 1287 | background: var(--color-icon-background); 1288 | } 1289 | 1290 | *::-webkit-scrollbar-thumb { 1291 | background-color: var(--color-accent); 1292 | border-radius: 999rem; 1293 | border: 0.25rem solid var(--color-icon-background); 1294 | } 1295 | 1296 | /* mobile */ 1297 | @media (max-width: 769px) { 1298 | .tsd-widget.options, 1299 | .tsd-widget.menu { 1300 | display: inline-block; 1301 | } 1302 | 1303 | .container-main { 1304 | display: flex; 1305 | } 1306 | html .col-content { 1307 | float: none; 1308 | max-width: 100%; 1309 | width: 100%; 1310 | } 1311 | html .col-sidebar { 1312 | position: fixed !important; 1313 | overflow-y: auto; 1314 | -webkit-overflow-scrolling: touch; 1315 | z-index: 1024; 1316 | top: 0 !important; 1317 | bottom: 0 !important; 1318 | left: auto !important; 1319 | right: 0 !important; 1320 | padding: 1.5rem 1.5rem 0 0; 1321 | width: 75vw; 1322 | visibility: hidden; 1323 | background-color: var(--color-background); 1324 | transform: translate(100%, 0); 1325 | } 1326 | html .col-sidebar > *:last-child { 1327 | padding-bottom: 20px; 1328 | } 1329 | html .overlay { 1330 | content: ''; 1331 | display: block; 1332 | position: fixed; 1333 | z-index: 1023; 1334 | top: 0; 1335 | left: 0; 1336 | right: 0; 1337 | bottom: 0; 1338 | background-color: rgba(0, 0, 0, 0.75); 1339 | visibility: hidden; 1340 | } 1341 | 1342 | .to-has-menu .overlay { 1343 | animation: fade-in 0.4s; 1344 | } 1345 | 1346 | .to-has-menu .col-sidebar { 1347 | animation: pop-in-from-right 0.4s; 1348 | } 1349 | 1350 | .from-has-menu .overlay { 1351 | animation: fade-out 0.4s; 1352 | } 1353 | 1354 | .from-has-menu .col-sidebar { 1355 | animation: pop-out-to-right 0.4s; 1356 | } 1357 | 1358 | .has-menu body { 1359 | overflow: hidden; 1360 | } 1361 | .has-menu .overlay { 1362 | visibility: visible; 1363 | } 1364 | .has-menu .col-sidebar { 1365 | visibility: visible; 1366 | transform: translate(0, 0); 1367 | display: flex; 1368 | flex-direction: column; 1369 | gap: 1.5rem; 1370 | max-height: 100vh; 1371 | padding: 1rem 2rem; 1372 | } 1373 | .has-menu .tsd-navigation { 1374 | max-height: 100%; 1375 | } 1376 | #tsd-toolbar-links { 1377 | display: none; 1378 | } 1379 | .tsd-navigation .tsd-nav-link { 1380 | display: flex; 1381 | } 1382 | } 1383 | 1384 | /* one sidebar */ 1385 | @media (min-width: 770px) { 1386 | .container-main { 1387 | display: grid; 1388 | grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); 1389 | grid-template-areas: 'sidebar content'; 1390 | margin: 2rem auto; 1391 | } 1392 | 1393 | .col-sidebar { 1394 | grid-area: sidebar; 1395 | } 1396 | .col-content { 1397 | grid-area: content; 1398 | padding: 0 1rem; 1399 | } 1400 | } 1401 | @media (min-width: 770px) and (max-width: 1399px) { 1402 | .col-sidebar { 1403 | max-height: calc(100vh - 2rem - 42px); 1404 | overflow: auto; 1405 | position: sticky; 1406 | top: 42px; 1407 | padding-top: 1rem; 1408 | } 1409 | .site-menu { 1410 | margin-top: 1rem; 1411 | } 1412 | } 1413 | 1414 | /* two sidebars */ 1415 | @media (min-width: 1200px) { 1416 | .container-main { 1417 | grid-template-columns: minmax(0, 1fr) minmax(0, 2.5fr) minmax(0, 20rem); 1418 | grid-template-areas: 'sidebar content toc'; 1419 | } 1420 | 1421 | .col-sidebar { 1422 | display: contents; 1423 | } 1424 | 1425 | .page-menu { 1426 | grid-area: toc; 1427 | padding-left: 1rem; 1428 | } 1429 | .site-menu { 1430 | grid-area: sidebar; 1431 | } 1432 | 1433 | .site-menu { 1434 | margin-top: 1rem 0; 1435 | } 1436 | 1437 | .page-menu, 1438 | .site-menu { 1439 | max-height: calc(100vh - 2rem - 42px); 1440 | overflow: auto; 1441 | position: sticky; 1442 | top: 42px; 1443 | } 1444 | } 1445 | -------------------------------------------------------------------------------- /docs/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | bad-words 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 27 |
28 |
29 | 45 |
46 | 52 | 54 |
55 |
56 |
57 |
58 |
59 |

bad-words

60 |
61 | 62 |

63 | bad-words 68 | 70 |

71 |

A javascript filter for badwords

72 |

73 | Commitizen friendly 78 | semantic-release 83 |

84 | 85 | 94 |

95 | As of version 2, requires you either have an environment that 96 | understands ES2016 and beyond or a transpiler like Babel. 97 |

98 | 99 | 108 |
yarn add bad-words
109 | 
110 | 111 | 120 |
import { Filter } from 'bad-words'
...
const filter = new Filter();

console.log(filter.clean("Don't be an ash0le")); //Don't be an ****** 121 |
122 | 123 | 124 | 133 |
const customFilter = new Filter({ placeHolder: 'x' })

customFilter.clean("Don't be an ash0le") //Don't be an xxxxxx 134 |
135 | 136 | 137 | 146 |
const filter = new Filter({ regex: /\*|\.|$/gi })

const filter = new Filter({ replaceRegex: /[A-Za-z0-9가-힣_]/g })
//multilingual support for word filtering 147 |
148 | 149 | 150 | 159 |
const filter = new Filter()

filter.addWords('some', 'bad', 'word')

filter.clean('some bad word!') //**** *** ****!

//or use an array using the spread operator

const newBadWords = ['some', 'bad', 'word']

filter.addWords(...newBadWords)

filter.clean('some bad word!') //**** *** ****!

//or

const filter = new Filter({ list: ['some', 'bad', 'word'] })

filter.clean('some bad word!') //**** *** ****! 160 |
161 | 162 | 163 | 172 |
const filter = new Filter({ emptyList: true })
filter.clean('hell this wont clean anything') //hell this wont clean anything 173 |
174 | 175 | 176 | 185 |
const filter = new Filter()

filter.removeWords('hells', 'sadist')

filter.clean('some hells word!') //some hells word!

//or use an array using the spread operator

const removeWords = ['hells', 'sadist']

filter.removeWords(...removeWords)

filter.clean('some sadist hells word!') //some sadist hells word! 186 |
187 | 188 | 189 | 198 | 199 | 205 | 206 | 207 | 216 | 217 | 226 |
npm test
227 | 
228 | 229 | 238 |

The MIT License (MIT)

239 |

Copyright (c) 2013 Michael Price

240 |

241 | Permission is hereby granted, free of charge, to any person 242 | obtaining a copy of this software and associated documentation files 243 | (the "Software"), to deal in the Software without 244 | restriction, including without limitation the rights to use, copy, 245 | modify, merge, publish, distribute, sublicense, and/or sell copies 246 | of the Software, and to permit persons to whom the Software is 247 | furnished to do so, subject to the following conditions: 248 |

249 |

250 | The above copyright notice and this permission notice shall be 251 | included in all copies or substantial portions of the Software. 252 |

253 |

254 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY 255 | KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE 256 | WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 257 | NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS 258 | BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN 259 | ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 260 | CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 261 | SOFTWARE. 262 |

263 |
264 |
265 |
266 | 472 | 488 |
489 |
490 | 496 |
497 | 498 | 499 | -------------------------------------------------------------------------------- /docs/interfaces/FilterOptions.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | FilterOptions | bad-words 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 27 |
28 |
29 | 45 |
46 | 52 | 54 |
55 |
56 |
57 |
58 |
59 |
60 | 64 |

Interface FilterOptions

65 |
66 |
67 |
68 |

Constructor options for Filter class.

69 |
70 |
71 |
72 |
73 | interface FilterOptions 75 | {
    emptyList?: boolean;
    exclude?: string[];
    list?: string[];
    placeHolder?: string;
    regex?: RegExp;
    replaceRegex?: RegExp;
    splitRegex?: RegExp;
} 114 |
115 | 126 |
127 |
128 |
129 | 130 | 141 | 142 |
143 |
144 |

Properties

145 | 190 |
191 |
192 |
193 |
194 |
195 |
196 | 197 |

198 | 199 | 200 | 201 | Properties 202 |

203 |
204 |
205 |
206 | 207 | 218 |
219 | emptyList?: 221 | boolean 222 |
223 |
224 |

Instantiate filter with no blocklist

225 |
226 |
227 | 238 |
239 |
240 | 241 | 251 |
252 | exclude?: 254 | string[] 256 |
257 | 268 |
269 |
270 | 271 | 278 |
279 | list?: 281 | string[] 283 |
284 |
285 |

Instantiate filter with custom list

286 |
287 |
288 | 299 |
300 |
301 | 302 | 313 |
314 | placeHolder?: 316 | string 317 |
318 |
319 |

Character used to replace profane words.

320 |
321 |
322 | 333 |
334 |
335 | 336 | 343 |
344 | regex?: 346 | RegExp 347 |
348 |
349 |

350 | Regular expression used to sanitize words before comparing 351 | them to blocklist. 352 |

353 |
354 |
355 | 366 |
367 |
368 | 369 | 380 |
381 | replaceRegex?: 383 | RegExp 384 |
385 |
386 |

387 | Regular expression used to replace profane words with 388 | placeHolder. 389 |

390 |
391 |
392 | 403 |
404 |
405 | 406 | 417 |
418 | splitRegex?: 420 | RegExp 421 |
422 |
423 |

Regular expression used to split a string into words.

424 |
425 |
426 | 437 |
438 |
439 |
440 |
441 |
442 | 619 | 635 |
636 |
637 | 643 |
644 | 645 | 646 | -------------------------------------------------------------------------------- /docs/modules.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | bad-words 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 27 |
28 |
29 | 45 |
46 | 52 | 54 |
55 |
56 |
57 |
58 |
59 |

bad-words

60 |
61 |
62 |

Index

63 |
64 |

Classes

65 |
66 | 68 | Filter 71 |
72 |
73 |
74 |

Interfaces

75 | 82 |
83 |
84 |

Type Aliases

85 |
86 | 88 | LocalList 91 |
92 |
93 |
94 |
95 |
96 |
97 | 222 | 238 |
239 |
240 | 246 |
247 | 248 | 249 | -------------------------------------------------------------------------------- /docs/types/LocalList.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | LocalList | bad-words 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 27 |
28 |
29 | 45 |
46 | 52 | 54 |
55 |
56 |
57 |
58 |
59 |
60 | 64 |

Type Alias LocalList

65 |
66 |
67 | LocalList: 69 | {
    words: string[];
} 78 |
79 |
80 |

Local list of profane words.

81 |
82 |
83 | 94 |
95 |
96 | 221 | 237 |
238 |
239 | 245 |
246 | 247 | 248 | -------------------------------------------------------------------------------- /eslint.config.mjs: -------------------------------------------------------------------------------- 1 | // @ts-check 2 | 3 | import eslint from '@eslint/js' 4 | import tseslint from 'typescript-eslint' 5 | import eslintConfigPrettier from 'eslint-config-prettier' 6 | 7 | export default tseslint.config({ 8 | extends: [ 9 | eslint.configs.recommended, 10 | ...tseslint.configs.recommended, 11 | eslintConfigPrettier, 12 | ], 13 | rules: { 14 | '@typescript-eslint/consistent-type-imports': 'error', 15 | }, 16 | }) 17 | -------------------------------------------------------------------------------- /lint-staged.config.mjs: -------------------------------------------------------------------------------- 1 | import { ESLint } from 'eslint' 2 | 3 | const removeIgnoredFiles = async (files) => { 4 | const eslint = new ESLint() 5 | const isIgnored = await Promise.all( 6 | files.map((file) => { 7 | return eslint.isPathIgnored(file) 8 | }), 9 | ) 10 | const filteredFiles = files 11 | .filter((_, i) => !isIgnored[i]) 12 | .map((file) => `"${file}"`) 13 | return filteredFiles.join(' ') 14 | } 15 | 16 | export default { 17 | '*.ts': async (files) => { 18 | const filesToLint = await removeIgnoredFiles(files) 19 | return [`eslint ${filesToLint}`] 20 | }, 21 | '*': 'prettier --ignore-unknown --write', 22 | } 23 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "bad-words", 3 | "version": "4.0.0", 4 | "description": "A javascript filter for bad words", 5 | "main": "dist/index.js", 6 | "type": "module", 7 | "types": "dist/index.d.ts", 8 | "exports": { 9 | ".": { 10 | "require": "./dist/index.js", 11 | "import": "./dist/esm/index.js", 12 | "types": "./dist/index.d.ts" 13 | } 14 | }, 15 | "directories": { 16 | "test": "test", 17 | "src": "src" 18 | }, 19 | "scripts": { 20 | "prettier": "prettier --write ./src", 21 | "lint": "eslint ./src", 22 | "lint:fix": "eslint --fix ./src", 23 | "build": "tsc --project tsconfig.cjs.json && tsc --project tsconfig.esm.json", 24 | "prepublishOnly": "tsc", 25 | "prepare": "husky && tsc", 26 | "rc": "standard-version --prerelease && git push --follow-tags && npm publish", 27 | "release": "standard-version && git push --follow-tags && npm publish", 28 | "test": "ava", 29 | "typedoc": "typedoc --out docs ./src/badwords.ts" 30 | }, 31 | "repository": { 32 | "type": "git", 33 | "url": "git://github.com/web-mech/badwords.git" 34 | }, 35 | "keywords": [ 36 | "curse", 37 | "words", 38 | "profanity", 39 | "filter" 40 | ], 41 | "dependencies": { 42 | "badwords-list": "^2.0.1-4" 43 | }, 44 | "devDependencies": { 45 | "@ava/typescript": "^5.0.0", 46 | "@sindresorhus/tsconfig": "^6.0.0", 47 | "ava": "^6.1.3", 48 | "better-assert": "1.0.0", 49 | "documentation": "^5.3.3", 50 | "@eslint/js": "^9.8.0", 51 | "@types/eslint__js": "^8.42.3", 52 | "@types/node": "^22.0.0", 53 | "eslint": "^9.8.0", 54 | "eslint-config-prettier": "^9.1.0", 55 | "husky": "^9.1.4", 56 | "lint-staged": "^15.2.7", 57 | "prettier": "^3.3.3", 58 | "standard-version": "^9.5.0", 59 | "typedoc": "^0.26.5", 60 | "typescript": "^5.5.4", 61 | "typescript-eslint": "^7.18.0" 62 | }, 63 | "author": "Mike P.", 64 | "license": "MIT", 65 | "engines": { 66 | "node": ">=8.0.0" 67 | } 68 | } 69 | -------------------------------------------------------------------------------- /src/badwords.ts: -------------------------------------------------------------------------------- 1 | import { localList } from './lang.js' 2 | import { array as baseList } from 'badwords-list' 3 | 4 | /** 5 | * Constructor options for Filter class. 6 | * 7 | * @property {boolean} emptyList - Instantiate filter with no blocklist 8 | * @property {array} list - Instantiate filter with custom list 9 | * @property {string} placeHolder - Character used to replace profane words. 10 | * @property {string} regex - Regular expression used to sanitize words before comparing them to blocklist. 11 | * @property {string} replaceRegex - Regular expression used to replace profane words with placeHolder. 12 | * @property {string} splitRegex - Regular expression used to split a string into words. 13 | */ 14 | export interface FilterOptions { 15 | emptyList?: boolean 16 | list?: string[] 17 | exclude?: string[] 18 | placeHolder?: string 19 | regex?: RegExp 20 | replaceRegex?: RegExp 21 | splitRegex?: RegExp 22 | } 23 | 24 | /** 25 | * Local list of profane words. 26 | * 27 | * @property {array} words - List of profane words. 28 | */ 29 | export type LocalList = { 30 | words: string[] 31 | } 32 | 33 | /** 34 | * Profanity Filter class. 35 | * @public 36 | */ 37 | export class Filter { 38 | /** 39 | * List of words to filter. 40 | * @type {array} list - List of words to filter. 41 | */ 42 | list: string[] = [] 43 | /** 44 | * List of words to exclude from filter. 45 | * @type {array} exclude - List of words to exclude from filter. 46 | */ 47 | exclude: string[] = [] 48 | /** 49 | * Character used to replace profane words. 50 | * @type {string} placeHolder - Character used to replace profane words. 51 | */ 52 | placeHolder: string = '*' 53 | /** 54 | * Regular expression used to sanitize words before comparing them to blocklist. 55 | * @type {string} regex - Regular expression used to sanitize words before comparing them to blocklist. 56 | */ 57 | regex: RegExp = /[^a-zA-Z0-9|$|@]|\^/g 58 | /** 59 | * Regular expression used to replace profane words with placeHolder. 60 | * @type {string} replaceRegex - Regular expression used to replace profane words with placeHolder. 61 | */ 62 | replaceRegex: RegExp = /\w/g 63 | /** 64 | * Regular expression used to split a string into words. 65 | * @type {string} splitRegex - Regular expression used to split a string into words. 66 | */ 67 | splitRegex: RegExp = /\b|_/g 68 | 69 | /** 70 | * Filter constructor. 71 | * 72 | * @param {FilterOptions} options - Constructor options for Filter class. 73 | */ 74 | constructor(options: FilterOptions = {}) { 75 | Object.assign(this, { 76 | list: 77 | (options.emptyList && []) || 78 | Array.prototype.concat.apply(localList, [baseList, options.list || []]), 79 | exclude: options.exclude || [], 80 | splitRegex: options.splitRegex || /\b|_/g, 81 | placeHolder: options.placeHolder || '*', 82 | regex: options.regex || /[^a-zA-Z0-9|$|@]|\^/g, 83 | replaceRegex: options.replaceRegex || /\w/g, 84 | }) 85 | } 86 | 87 | /** 88 | * Determine if a string contains profane language. 89 | * @param {string} string - String to evaluate for profanity. 90 | */ 91 | isProfane(string: string): boolean { 92 | return ( 93 | this.list.filter((word) => { 94 | const wordExp = new RegExp( 95 | `\\b${word.replace(/(\W)/g, '\\$1')}\\b`, 96 | 'gi', 97 | ) 98 | return ( 99 | !this.exclude.includes(word.toLowerCase()) && wordExp.test(string) 100 | ) 101 | }).length > 0 || false 102 | ) 103 | } 104 | 105 | /** 106 | * Replace a word with placeHolder characters; 107 | * @param {string} string - String to replace. 108 | */ 109 | replaceWord(string: string): string { 110 | return string 111 | .replace(this.regex, '') 112 | .replace(this.replaceRegex, this.placeHolder) 113 | } 114 | 115 | /** 116 | * Evaluate a string for profanity and return an edited version. 117 | * @param {string} input - String to filter. 118 | */ 119 | clean(input: string): string { 120 | const delimiter = this.splitRegex.exec(input) 121 | 122 | if (!input || !delimiter) { 123 | return input 124 | } 125 | 126 | return input 127 | .split(this.splitRegex) 128 | .map((word) => { 129 | return this.isProfane(word) ? this.replaceWord(word) : word 130 | }) 131 | .join(delimiter[0]) 132 | } 133 | 134 | /** 135 | * Add word(s) to blocklist filter / remove words from whitelist filter 136 | * @param {...string} words - Word(s) to add to blocklist 137 | */ 138 | addWords(...words: string[]): void { 139 | this.list.push(...words) 140 | 141 | words 142 | .map((word) => word.toLowerCase()) 143 | .forEach((word) => { 144 | if (this.exclude.includes(word)) { 145 | this.exclude.splice(this.exclude.indexOf(word), 1) 146 | } 147 | }) 148 | } 149 | 150 | /** 151 | * Add words to allowlist filter 152 | * @param {...string} words - Word(s) to add to allowlist. 153 | */ 154 | removeWords(...words: string[]): void { 155 | this.exclude.push(...words.map((word) => word.toLowerCase())) 156 | } 157 | } 158 | -------------------------------------------------------------------------------- /src/index.ts: -------------------------------------------------------------------------------- 1 | export { Filter, FilterOptions, LocalList } from './badwords.js' 2 | -------------------------------------------------------------------------------- /src/lang.json: -------------------------------------------------------------------------------- 1 | { 2 | "words": [ 3 | "ahole", 4 | "anus", 5 | "ash0le", 6 | "ash0les", 7 | "asholes", 8 | "ass", 9 | "Ass Monkey", 10 | "Assface", 11 | "assh0le", 12 | "assh0lez", 13 | "asshole", 14 | "assholes", 15 | "assholz", 16 | "asswipe", 17 | "azzhole", 18 | "bassterds", 19 | "bastard", 20 | "bastards", 21 | "bastardz", 22 | "basterds", 23 | "basterdz", 24 | "Biatch", 25 | "bitch", 26 | "bitches", 27 | "Blow Job", 28 | "boffing", 29 | "butthole", 30 | "buttwipe", 31 | "c0ck", 32 | "c0cks", 33 | "c0k", 34 | "Carpet Muncher", 35 | "cawk", 36 | "cawks", 37 | "Clit", 38 | "cnts", 39 | "cntz", 40 | "cock", 41 | "cockhead", 42 | "cock-head", 43 | "cocks", 44 | "CockSucker", 45 | "cock-sucker", 46 | "crap", 47 | "cum", 48 | "cunt", 49 | "cunts", 50 | "cuntz", 51 | "dick", 52 | "dild0", 53 | "dild0s", 54 | "dildo", 55 | "dildos", 56 | "dilld0", 57 | "dilld0s", 58 | "dominatricks", 59 | "dominatrics", 60 | "dominatrix", 61 | "dyke", 62 | "enema", 63 | "f u c k", 64 | "f u c k e r", 65 | "fag", 66 | "fag1t", 67 | "faget", 68 | "fagg1t", 69 | "faggit", 70 | "faggot", 71 | "fagg0t", 72 | "fagit", 73 | "fags", 74 | "fagz", 75 | "faig", 76 | "faigs", 77 | "fart", 78 | "flipping the bird", 79 | "fuck", 80 | "fucker", 81 | "fuckin", 82 | "fucking", 83 | "fucks", 84 | "Fudge Packer", 85 | "fuk", 86 | "Fukah", 87 | "Fuken", 88 | "fuker", 89 | "Fukin", 90 | "Fukk", 91 | "Fukkah", 92 | "Fukken", 93 | "Fukker", 94 | "Fukkin", 95 | "g00k", 96 | "God-damned", 97 | "h00r", 98 | "h0ar", 99 | "h0re", 100 | "hells", 101 | "hoar", 102 | "hoor", 103 | "hoore", 104 | "jackoff", 105 | "jap", 106 | "japs", 107 | "jerk-off", 108 | "jisim", 109 | "jiss", 110 | "jizm", 111 | "jizz", 112 | "knob", 113 | "knobs", 114 | "knobz", 115 | "kunt", 116 | "kunts", 117 | "kuntz", 118 | "Lezzian", 119 | "Lipshits", 120 | "Lipshitz", 121 | "masochist", 122 | "masokist", 123 | "massterbait", 124 | "masstrbait", 125 | "masstrbate", 126 | "masterbaiter", 127 | "masterbate", 128 | "masterbates", 129 | "Motha Fucker", 130 | "Motha Fuker", 131 | "Motha Fukkah", 132 | "Motha Fukker", 133 | "Mother Fucker", 134 | "Mother Fukah", 135 | "Mother Fuker", 136 | "Mother Fukkah", 137 | "Mother Fukker", 138 | "mother-fucker", 139 | "Mutha Fucker", 140 | "Mutha Fukah", 141 | "Mutha Fuker", 142 | "Mutha Fukkah", 143 | "Mutha Fukker", 144 | "n1gr", 145 | "nastt", 146 | "nigger;", 147 | "nigur;", 148 | "niiger;", 149 | "niigr;", 150 | "orafis", 151 | "orgasim;", 152 | "orgasm", 153 | "orgasum", 154 | "oriface", 155 | "orifice", 156 | "orifiss", 157 | "packi", 158 | "packie", 159 | "packy", 160 | "paki", 161 | "pakie", 162 | "paky", 163 | "pecker", 164 | "peeenus", 165 | "peeenusss", 166 | "peenus", 167 | "peinus", 168 | "pen1s", 169 | "penas", 170 | "penis", 171 | "penis-breath", 172 | "penus", 173 | "penuus", 174 | "Phuc", 175 | "Phuck", 176 | "Phuk", 177 | "Phuker", 178 | "Phukker", 179 | "polac", 180 | "polack", 181 | "polak", 182 | "Poonani", 183 | "pr1c", 184 | "pr1ck", 185 | "pr1k", 186 | "pusse", 187 | "pussee", 188 | "pussy", 189 | "puuke", 190 | "puuker", 191 | "recktum", 192 | "rectum", 193 | "retard", 194 | "sadist", 195 | "scank", 196 | "schlong", 197 | "screwing", 198 | "semen", 199 | "sex", 200 | "sexy", 201 | "Sh!t", 202 | "sh1t", 203 | "sh1ter", 204 | "sh1ts", 205 | "sh1tter", 206 | "sh1tz", 207 | "shit", 208 | "shits", 209 | "shitter", 210 | "Shitty", 211 | "Shity", 212 | "shitz", 213 | "Shyt", 214 | "Shyte", 215 | "Shytty", 216 | "Shyty", 217 | "skanck", 218 | "skank", 219 | "skankee", 220 | "skankey", 221 | "skanks", 222 | "Skanky", 223 | "slag", 224 | "slut", 225 | "sluts", 226 | "Slutty", 227 | "slutz", 228 | "son-of-a-bitch", 229 | "tit", 230 | "turd", 231 | "va1jina", 232 | "vag1na", 233 | "vagiina", 234 | "vagina", 235 | "vaj1na", 236 | "vajina", 237 | "vullva", 238 | "vulva", 239 | "w0p", 240 | "wh00r", 241 | "wh0re", 242 | "whore", 243 | "xrated", 244 | "xxx", 245 | "b!+ch", 246 | "bitch", 247 | "blowjob", 248 | "clit", 249 | "arschloch", 250 | "fuck", 251 | "shit", 252 | "ass", 253 | "asshole", 254 | "b!tch", 255 | "b17ch", 256 | "b1tch", 257 | "bastard", 258 | "bi+ch", 259 | "boiolas", 260 | "buceta", 261 | "c0ck", 262 | "cawk", 263 | "chink", 264 | "cipa", 265 | "clits", 266 | "cock", 267 | "cum", 268 | "cunt", 269 | "dildo", 270 | "dirsa", 271 | "ejakulate", 272 | "fatass", 273 | "fcuk", 274 | "fuk", 275 | "fux0r", 276 | "hoer", 277 | "hore", 278 | "jism", 279 | "kawk", 280 | "l3itch", 281 | "l3i+ch", 282 | "masturbate", 283 | "masterbat*", 284 | "masterbat3", 285 | "motherfucker", 286 | "s.o.b.", 287 | "mofo", 288 | "nazi", 289 | "nigga", 290 | "nigger", 291 | "nutsack", 292 | "phuck", 293 | "pimpis", 294 | "pusse", 295 | "pussy", 296 | "scrotum", 297 | "sh!t", 298 | "shemale", 299 | "shi+", 300 | "sh!+", 301 | "slut", 302 | "smut", 303 | "teets", 304 | "tits", 305 | "boobs", 306 | "b00bs", 307 | "teez", 308 | "testical", 309 | "testicle", 310 | "titt", 311 | "w00se", 312 | "jackoff", 313 | "wank", 314 | "whoar", 315 | "whore", 316 | "*damn", 317 | "*dyke", 318 | "*fuck*", 319 | "*shit*", 320 | "@$$", 321 | "amcik", 322 | "andskota", 323 | "arse*", 324 | "assrammer", 325 | "ayir", 326 | "bi7ch", 327 | "bitch*", 328 | "bollock*", 329 | "breasts", 330 | "butt-pirate", 331 | "cabron", 332 | "cazzo", 333 | "chraa", 334 | "chuj", 335 | "Cock*", 336 | "cunt*", 337 | "d4mn", 338 | "daygo", 339 | "dego", 340 | "dick*", 341 | "dike*", 342 | "dupa", 343 | "dziwka", 344 | "ejackulate", 345 | "Ekrem*", 346 | "Ekto", 347 | "enculer", 348 | "faen", 349 | "fag*", 350 | "fanculo", 351 | "fanny", 352 | "feces", 353 | "feg", 354 | "Felcher", 355 | "ficken", 356 | "fitt*", 357 | "Flikker", 358 | "foreskin", 359 | "Fotze", 360 | "Fu(*", 361 | "fuk*", 362 | "futkretzn", 363 | "gook", 364 | "guiena", 365 | "h0r", 366 | "h4x0r", 367 | "hell", 368 | "helvete", 369 | "hoer*", 370 | "honkey", 371 | "Huevon", 372 | "hui", 373 | "injun", 374 | "jizz", 375 | "kanker*", 376 | "kike", 377 | "klootzak", 378 | "kraut", 379 | "knulle", 380 | "kuk", 381 | "kuksuger", 382 | "Kurac", 383 | "kurwa", 384 | "kusi*", 385 | "kyrpa*", 386 | "lesbo", 387 | "mamhoon", 388 | "masturbat*", 389 | "merd*", 390 | "mibun", 391 | "monkleigh", 392 | "mouliewop", 393 | "muie", 394 | "mulkku", 395 | "muschi", 396 | "nazis", 397 | "nepesaurio", 398 | "nigger*", 399 | "orospu", 400 | "paska*", 401 | "perse", 402 | "picka", 403 | "pierdol*", 404 | "pillu*", 405 | "pimmel", 406 | "piss*", 407 | "pizda", 408 | "poontsee", 409 | "poop", 410 | "porn", 411 | "p0rn", 412 | "pr0n", 413 | "preteen", 414 | "pula", 415 | "pule", 416 | "puta", 417 | "puto", 418 | "qahbeh", 419 | "queef*", 420 | "rautenberg", 421 | "schaffer", 422 | "scheiss*", 423 | "schlampe", 424 | "schmuck", 425 | "screw", 426 | "sh!t*", 427 | "sharmuta", 428 | "sharmute", 429 | "shipal", 430 | "shiz", 431 | "skribz", 432 | "skurwysyn", 433 | "sphencter", 434 | "spic", 435 | "spierdalaj", 436 | "splooge", 437 | "suka", 438 | "b00b*", 439 | "testicle*", 440 | "titt*", 441 | "twat", 442 | "vittu", 443 | "wank*", 444 | "wetback*", 445 | "wichser", 446 | "wop*", 447 | "yed", 448 | "zabourah" 449 | ] 450 | } 451 | -------------------------------------------------------------------------------- /src/lang.ts: -------------------------------------------------------------------------------- 1 | export const localList: string[] = [ 2 | 'ahole', 3 | 'anus', 4 | 'ash0le', 5 | 'ash0les', 6 | 'asholes', 7 | 'ass', 8 | 'Ass Monkey', 9 | 'Assface', 10 | 'assh0le', 11 | 'assh0lez', 12 | 'asshole', 13 | 'assholes', 14 | 'assholz', 15 | 'asswipe', 16 | 'azzhole', 17 | 'bassterds', 18 | 'bastard', 19 | 'bastards', 20 | 'bastardz', 21 | 'basterds', 22 | 'basterdz', 23 | 'Biatch', 24 | 'bitch', 25 | 'bitches', 26 | 'Blow Job', 27 | 'boffing', 28 | 'butthole', 29 | 'buttwipe', 30 | 'c0ck', 31 | 'c0cks', 32 | 'c0k', 33 | 'Carpet Muncher', 34 | 'cawk', 35 | 'cawks', 36 | 'Clit', 37 | 'cnts', 38 | 'cntz', 39 | 'cock', 40 | 'cockhead', 41 | 'cock-head', 42 | 'cocks', 43 | 'CockSucker', 44 | 'cock-sucker', 45 | 'crap', 46 | 'cum', 47 | 'cunt', 48 | 'cunts', 49 | 'cuntz', 50 | 'dick', 51 | 'dild0', 52 | 'dild0s', 53 | 'dildo', 54 | 'dildos', 55 | 'dilld0', 56 | 'dilld0s', 57 | 'dominatricks', 58 | 'dominatrics', 59 | 'dominatrix', 60 | 'dyke', 61 | 'enema', 62 | 'f u c k', 63 | 'f u c k e r', 64 | 'fag', 65 | 'fag1t', 66 | 'faget', 67 | 'fagg1t', 68 | 'faggit', 69 | 'faggot', 70 | 'fagg0t', 71 | 'fagit', 72 | 'fags', 73 | 'fagz', 74 | 'faig', 75 | 'faigs', 76 | 'fart', 77 | 'flipping the bird', 78 | 'fuck', 79 | 'fucker', 80 | 'fuckin', 81 | 'fucking', 82 | 'fucks', 83 | 'Fudge Packer', 84 | 'fuk', 85 | 'Fukah', 86 | 'Fuken', 87 | 'fuker', 88 | 'Fukin', 89 | 'Fukk', 90 | 'Fukkah', 91 | 'Fukken', 92 | 'Fukker', 93 | 'Fukkin', 94 | 'g00k', 95 | 'God-damned', 96 | 'h00r', 97 | 'h0ar', 98 | 'h0re', 99 | 'hells', 100 | 'hoar', 101 | 'hoor', 102 | 'hoore', 103 | 'jackoff', 104 | 'jap', 105 | 'japs', 106 | 'jerk-off', 107 | 'jisim', 108 | 'jiss', 109 | 'jizm', 110 | 'jizz', 111 | 'knob', 112 | 'knobs', 113 | 'knobz', 114 | 'kunt', 115 | 'kunts', 116 | 'kuntz', 117 | 'Lezzian', 118 | 'Lipshits', 119 | 'Lipshitz', 120 | 'masochist', 121 | 'masokist', 122 | 'massterbait', 123 | 'masstrbait', 124 | 'masstrbate', 125 | 'masterbaiter', 126 | 'masterbate', 127 | 'masterbates', 128 | 'Motha Fucker', 129 | 'Motha Fuker', 130 | 'Motha Fukkah', 131 | 'Motha Fukker', 132 | 'Mother Fucker', 133 | 'Mother Fukah', 134 | 'Mother Fuker', 135 | 'Mother Fukkah', 136 | 'Mother Fukker', 137 | 'mother-fucker', 138 | 'Mutha Fucker', 139 | 'Mutha Fukah', 140 | 'Mutha Fuker', 141 | 'Mutha Fukkah', 142 | 'Mutha Fukker', 143 | 'n1gr', 144 | 'nastt', 145 | 'nigger;', 146 | 'nigur;', 147 | 'niiger;', 148 | 'niigr;', 149 | 'orafis', 150 | 'orgasim;', 151 | 'orgasm', 152 | 'orgasum', 153 | 'oriface', 154 | 'orifice', 155 | 'orifiss', 156 | 'packi', 157 | 'packie', 158 | 'packy', 159 | 'paki', 160 | 'pakie', 161 | 'paky', 162 | 'pecker', 163 | 'peeenus', 164 | 'peeenusss', 165 | 'peenus', 166 | 'peinus', 167 | 'pen1s', 168 | 'penas', 169 | 'penis', 170 | 'penis-breath', 171 | 'penus', 172 | 'penuus', 173 | 'Phuc', 174 | 'Phuck', 175 | 'Phuk', 176 | 'Phuker', 177 | 'Phukker', 178 | 'polac', 179 | 'polack', 180 | 'polak', 181 | 'Poonani', 182 | 'pr1c', 183 | 'pr1ck', 184 | 'pr1k', 185 | 'pusse', 186 | 'pussee', 187 | 'pussy', 188 | 'puuke', 189 | 'puuker', 190 | 'recktum', 191 | 'rectum', 192 | 'retard', 193 | 'sadist', 194 | 'scank', 195 | 'schlong', 196 | 'screwing', 197 | 'semen', 198 | 'sex', 199 | 'sexy', 200 | 'Sh!t', 201 | 'sh1t', 202 | 'sh1ter', 203 | 'sh1ts', 204 | 'sh1tter', 205 | 'sh1tz', 206 | 'shit', 207 | 'shits', 208 | 'shitter', 209 | 'Shitty', 210 | 'Shity', 211 | 'shitz', 212 | 'Shyt', 213 | 'Shyte', 214 | 'Shytty', 215 | 'Shyty', 216 | 'skanck', 217 | 'skank', 218 | 'skankee', 219 | 'skankey', 220 | 'skanks', 221 | 'Skanky', 222 | 'slag', 223 | 'slut', 224 | 'sluts', 225 | 'Slutty', 226 | 'slutz', 227 | 'son-of-a-bitch', 228 | 'tit', 229 | 'turd', 230 | 'va1jina', 231 | 'vag1na', 232 | 'vagiina', 233 | 'vagina', 234 | 'vaj1na', 235 | 'vajina', 236 | 'vullva', 237 | 'vulva', 238 | 'w0p', 239 | 'wh00r', 240 | 'wh0re', 241 | 'whore', 242 | 'xrated', 243 | 'xxx', 244 | 'b!+ch', 245 | 'bitch', 246 | 'blowjob', 247 | 'clit', 248 | 'arschloch', 249 | 'fuck', 250 | 'shit', 251 | 'ass', 252 | 'asshole', 253 | 'b!tch', 254 | 'b17ch', 255 | 'b1tch', 256 | 'bastard', 257 | 'bi+ch', 258 | 'boiolas', 259 | 'buceta', 260 | 'c0ck', 261 | 'cawk', 262 | 'chink', 263 | 'cipa', 264 | 'clits', 265 | 'cock', 266 | 'cum', 267 | 'cunt', 268 | 'dildo', 269 | 'dirsa', 270 | 'ejakulate', 271 | 'fatass', 272 | 'fcuk', 273 | 'fuk', 274 | 'fux0r', 275 | 'hoer', 276 | 'hore', 277 | 'jism', 278 | 'kawk', 279 | 'l3itch', 280 | 'l3i+ch', 281 | 'masturbate', 282 | 'masterbat*', 283 | 'masterbat3', 284 | 'motherfucker', 285 | 's.o.b.', 286 | 'mofo', 287 | 'nazi', 288 | 'nigga', 289 | 'nigger', 290 | 'nutsack', 291 | 'phuck', 292 | 'pimpis', 293 | 'pusse', 294 | 'pussy', 295 | 'scrotum', 296 | 'sh!t', 297 | 'shemale', 298 | 'shi+', 299 | 'sh!+', 300 | 'slut', 301 | 'smut', 302 | 'teets', 303 | 'tits', 304 | 'boobs', 305 | 'b00bs', 306 | 'teez', 307 | 'testical', 308 | 'testicle', 309 | 'titt', 310 | 'w00se', 311 | 'jackoff', 312 | 'wank', 313 | 'whoar', 314 | 'whore', 315 | '*damn', 316 | '*dyke', 317 | '*fuck*', 318 | '*shit*', 319 | '@$$', 320 | 'amcik', 321 | 'andskota', 322 | 'arse*', 323 | 'assrammer', 324 | 'ayir', 325 | 'bi7ch', 326 | 'bitch*', 327 | 'bollock*', 328 | 'breasts', 329 | 'butt-pirate', 330 | 'cabron', 331 | 'cazzo', 332 | 'chraa', 333 | 'chuj', 334 | 'Cock*', 335 | 'cunt*', 336 | 'd4mn', 337 | 'daygo', 338 | 'dego', 339 | 'dick*', 340 | 'dike*', 341 | 'dupa', 342 | 'dziwka', 343 | 'ejackulate', 344 | 'Ekrem*', 345 | 'Ekto', 346 | 'enculer', 347 | 'faen', 348 | 'fag*', 349 | 'fanculo', 350 | 'fanny', 351 | 'feces', 352 | 'feg', 353 | 'Felcher', 354 | 'ficken', 355 | 'fitt*', 356 | 'Flikker', 357 | 'foreskin', 358 | 'Fotze', 359 | 'Fu(*', 360 | 'fuk*', 361 | 'futkretzn', 362 | 'gook', 363 | 'guiena', 364 | 'h0r', 365 | 'h4x0r', 366 | 'hell', 367 | 'helvete', 368 | 'hoer*', 369 | 'honkey', 370 | 'Huevon', 371 | 'hui', 372 | 'injun', 373 | 'jizz', 374 | 'kanker*', 375 | 'kike', 376 | 'klootzak', 377 | 'kraut', 378 | 'knulle', 379 | 'kuk', 380 | 'kuksuger', 381 | 'Kurac', 382 | 'kurwa', 383 | 'kusi*', 384 | 'kyrpa*', 385 | 'lesbo', 386 | 'mamhoon', 387 | 'masturbat*', 388 | 'merd*', 389 | 'mibun', 390 | 'monkleigh', 391 | 'mouliewop', 392 | 'muie', 393 | 'mulkku', 394 | 'muschi', 395 | 'nazis', 396 | 'nepesaurio', 397 | 'nigger*', 398 | 'orospu', 399 | 'paska*', 400 | 'perse', 401 | 'picka', 402 | 'pierdol*', 403 | 'pillu*', 404 | 'pimmel', 405 | 'piss*', 406 | 'pizda', 407 | 'poontsee', 408 | 'poop', 409 | 'porn', 410 | 'p0rn', 411 | 'pr0n', 412 | 'preteen', 413 | 'pula', 414 | 'pule', 415 | 'puta', 416 | 'puto', 417 | 'qahbeh', 418 | 'queef*', 419 | 'rautenberg', 420 | 'schaffer', 421 | 'scheiss*', 422 | 'schlampe', 423 | 'schmuck', 424 | 'screw', 425 | 'sh!t*', 426 | 'sharmuta', 427 | 'sharmute', 428 | 'shipal', 429 | 'shiz', 430 | 'skribz', 431 | 'skurwysyn', 432 | 'sphencter', 433 | 'spic', 434 | 'spierdalaj', 435 | 'splooge', 436 | 'suka', 437 | 'b00b*', 438 | 'testicle*', 439 | 'titt*', 440 | 'twat', 441 | 'vittu', 442 | 'wank*', 443 | 'wetback*', 444 | 'wichser', 445 | 'wop*', 446 | 'yed', 447 | 'zabourah', 448 | ] 449 | -------------------------------------------------------------------------------- /tests/addWords.spec.ts: -------------------------------------------------------------------------------- 1 | import test from 'ava' 2 | import { Filter } from '../src/index.js' 3 | 4 | test('addWords: Should append words to the filter list.', (t) => { 5 | const filter: Filter = new Filter() 6 | filter.addWords('dog', 'go') 7 | t.is(filter.clean('Go dog go'), '** *** **') 8 | }) 9 | 10 | test('addWords: Should append words to the filter using an array', (t) => { 11 | const addWords = ['go', 'dog'] 12 | const filter = new Filter() 13 | filter.addWords(...addWords) 14 | t.is(filter.clean('Go dog go'), '** *** **') 15 | }) 16 | 17 | test('addWords: Should allow a list to be passed to the constructor', (t) => { 18 | const filter = new Filter({ 19 | list: ['dog'], 20 | }) 21 | 22 | t.is(filter.clean('Go dog go'), 'Go *** go') 23 | }) 24 | -------------------------------------------------------------------------------- /tests/ava.spec.ts: -------------------------------------------------------------------------------- 1 | import test from 'ava' 2 | 3 | test('base test', (t) => { 4 | t.is(true, true) 5 | }) 6 | -------------------------------------------------------------------------------- /tests/filter.spec.ts: -------------------------------------------------------------------------------- 1 | import test from 'ava' 2 | import { Filter } from '../src/badwords.js' 3 | 4 | test('clean: Should replace a bad word within a sentence asterisks (******)', (t) => { 5 | const filter = new Filter() 6 | console.log(filter.clean("Don't be an ash0le")) 7 | t.is(filter.clean("Don't be an ash0le"), "Don't be an ******") 8 | }) 9 | 10 | test('clean: Should replace multiple instances of any bad words within a sentence asterisks (******)', (t) => { 11 | const filter = new Filter() 12 | t.is(filter.clean('cnts ash0le knob xxx'), '**** ****** **** ***') 13 | }) 14 | 15 | test('clean: Should not replace anything within a sentence if there are no bad words', (t) => { 16 | const filter = new Filter() 17 | t.is(filter.clean('The cat ran fast'), 'The cat ran fast') 18 | }) 19 | 20 | test('clean: Should replace a string with proper placeholder when overridden', (t) => { 21 | const customFilter = new Filter({ placeHolder: 'x' }) 22 | t.is( 23 | customFilter.clean('This is a hells good test'), 24 | 'This is a xxxxx good test', 25 | ) 26 | }) 27 | 28 | test('clean: Should allow an instance of filter with an empty blacklist', (t) => { 29 | const customFilter = new Filter({ 30 | emptyList: true, 31 | }) 32 | t.is( 33 | customFilter.clean('This is a hells good test'), 34 | 'This is a hells good test', 35 | ) 36 | }) 37 | 38 | test('clean: Should tokenize words according to regex word boundaries', (t) => { 39 | const filter = new Filter() 40 | t.is(filter.clean('what a bitch...fuck you'), 'what a *****...**** you') 41 | t.is(filter.clean("

Don't be an asshole

"), "

Don't be an *******

") 42 | }) 43 | 44 | /** 45 | xtest('clean: Should filter words that are derivatives of words from the filter blacklist', (t) => { 46 | 47 | const filter = new Filter() 48 | t.is(filter.clean('shitshit'), '********') 49 | }) */ 50 | 51 | test("clearn: Shouldn't filter words that aren't profane.", (t) => { 52 | const filter = new Filter() 53 | t.is(filter.clean('hello there'), 'hello there') 54 | }) 55 | 56 | test('clean: Should seperate string with backspace or underscore', (t) => { 57 | const filter = new Filter() 58 | t.is(filter.clean("Don't be an ash0le_word"), "Don't be an ******word") 59 | }) 60 | 61 | test('clean: Should not replace anything of a single and not profane word', (t) => { 62 | const filter = new Filter() 63 | t.is(filter.clean('áéñóú'), 'áéñóú') 64 | }) 65 | 66 | test('clean: Should not throw exceptions when nothing but whitespace passed to filter', (t) => { 67 | const filter = new Filter() 68 | const testString = ` 69 | 70 | 71 | 72 | ` 73 | 74 | const testString2 = ` 75 | 76 | 77 | 78 | Hello 79 | 80 | ` 81 | 82 | const testString3 = ` 83 | 84 | 85 | 86 | Fuck 87 | 88 | 89 | ` 90 | t.is(filter.clean(testString), testString) 91 | t.is(filter.clean(testString2), testString2) 92 | t.is( 93 | filter.clean(testString3), 94 | ` 95 | 96 | 97 | 98 | **** 99 | 100 | 101 | `, 102 | ) 103 | t.is(filter.clean(''), '') 104 | }) 105 | -------------------------------------------------------------------------------- /tests/isProfane.spec.ts: -------------------------------------------------------------------------------- 1 | import test from 'ava' 2 | import { Filter } from '../src/badwords.js' 3 | 4 | test('isProfane: Should detect a bad word and return a boolean value', (t) => { 5 | const filter = new Filter() 6 | t.is(filter.isProfane('ash0le'), true) 7 | }) 8 | 9 | test('isProfane: Should return false when no bad word is detected', (t) => { 10 | const filter = new Filter() 11 | t.is(filter.isProfane('wife'), false) 12 | }) 13 | 14 | test('isProfane: Should be able to detect a bad word in a sentence', (t) => { 15 | const filter = new Filter() 16 | t.is(filter.isProfane('that person is an ash0le'), true) 17 | }) 18 | 19 | test('isProfane: Filters out special characters appropriately', (t) => { 20 | const filter = new Filter() 21 | t.is(filter.isProfane("You're an asshole^ you are"), true) 22 | }) 23 | 24 | test('isProfane: Should detect filtered words from badwords-list', (t) => { 25 | const filter = new Filter() 26 | t.is(filter.isProfane('willies'), true) 27 | }) 28 | 29 | test('isProfane: Should detect filtered words regardless of type case', (t) => { 30 | const filter = new Filter({ 31 | list: ['Test'], 32 | }) 33 | t.is(filter.isProfane('test'), true) 34 | }) 35 | 36 | test('isProfane: Should tokenize words according to regex word boundaries', (t) => { 37 | const filter = new Filter() 38 | t.is(filter.isProfane('that person is an\nasshole'), true) 39 | }) 40 | 41 | test('isProfane: Should detect bad word phrases', (t) => { 42 | const filter = new Filter() 43 | filter.addWords('oh no') 44 | t.is(filter.isProfane('oh no! this is profane!'), true) 45 | }) 46 | -------------------------------------------------------------------------------- /tests/options.spec.ts: -------------------------------------------------------------------------------- 1 | import test from 'ava' 2 | import { Filter } from '../src/badwords.js' 3 | 4 | test('options: default value', (t) => { 5 | const filter = new Filter() 6 | filter.addWords('français') 7 | t.is(filter.clean('fucking asshole'), '******* *******') 8 | t.is(filter.clean('mot en français'), 'mot en français') 9 | }) 10 | 11 | test('options: override value', (t) => { 12 | const filter = new Filter({ splitRegex: / / }) 13 | filter.addWords('français') 14 | t.is(filter.clean('fucking asshole'), '******* *******') 15 | t.is(filter.clean('mot en français'), 'mot en *******') 16 | }) 17 | -------------------------------------------------------------------------------- /tests/removeWords.spec.ts: -------------------------------------------------------------------------------- 1 | import test from 'ava' 2 | import { Filter } from '../src/badwords.js' 3 | 4 | test('removeWords: Should allow you to remove words from the filter blacklist and no longer filter them (case-insensitive)', (t) => { 5 | const filter = new Filter() 6 | filter.removeWords('Hells') 7 | t.is(filter.clean('This is a hells good test'), 'This is a hells good test') 8 | }) 9 | 10 | test('removeWords: Should allow you to remove an array of words from the filter blacklist and no longer filter them', (t) => { 11 | const filter = new Filter() 12 | const removingWords = ['hells', 'sadist'] 13 | 14 | filter.removeWords(...removingWords) 15 | t.is( 16 | filter.clean('This is a hells sadist test'), 17 | 'This is a hells sadist test', 18 | ) 19 | }) 20 | -------------------------------------------------------------------------------- /tests/replaceWord.spec.ts: -------------------------------------------------------------------------------- 1 | import test from 'ava' 2 | import { Filter } from '../src/badwords.js' 3 | 4 | test('replaceWord: Should replace a bad word with asterisks (******)', (t) => { 5 | const filter = new Filter() 6 | 7 | t.is(filter.replaceWord('ash0le'), '******') 8 | }) 9 | -------------------------------------------------------------------------------- /tsconfig.cjs.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "target": "ES2023", 4 | "module": "commonjs", 5 | "declaration": true, 6 | "forceConsistentCasingInFileNames": true, 7 | "outDir": "./dist", 8 | "rootDir": "./src", 9 | "strict": true, 10 | "types": ["node"] 11 | }, 12 | "include": ["src/**/*"] 13 | } 14 | -------------------------------------------------------------------------------- /tsconfig.esm.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "target": "ES2023", 4 | "module": "ES6", 5 | "declaration": true, 6 | "forceConsistentCasingInFileNames": true, 7 | "outDir": "./dist/esm", 8 | "rootDir": "./src", 9 | "strict": true, 10 | "types": ["node"], 11 | "esModuleInterop": true, 12 | "moduleResolution": "node" 13 | }, 14 | "include": ["src/**/*"] 15 | } 16 | -------------------------------------------------------------------------------- /tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "declaration": true, 4 | "target": "ES2018", 5 | "module": "ESNext", 6 | "esModuleInterop": true, 7 | "moduleResolution": "Node", 8 | "lib": ["ESNext", "ESNext.AsyncIterable", "DOM"], 9 | "strict": true, 10 | "noImplicitAny": true, 11 | "types": ["@types/node"], 12 | "outDir": "./.test", 13 | "baseUrl": "./", 14 | "skipLibCheck": true 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /tsconfig.tsbuildinfo: -------------------------------------------------------------------------------- 1 | {"program":{"fileNames":["./node_modules/typescript/lib/lib.es5.d.ts","./node_modules/typescript/lib/lib.es2015.d.ts","./node_modules/typescript/lib/lib.es2016.d.ts","./node_modules/typescript/lib/lib.es2017.d.ts","./node_modules/typescript/lib/lib.es2018.d.ts","./node_modules/typescript/lib/lib.es2019.d.ts","./node_modules/typescript/lib/lib.es2020.d.ts","./node_modules/typescript/lib/lib.es2021.d.ts","./node_modules/typescript/lib/lib.es2022.d.ts","./node_modules/typescript/lib/lib.es2023.d.ts","./node_modules/typescript/lib/lib.dom.d.ts","./node_modules/typescript/lib/lib.dom.iterable.d.ts","./node_modules/typescript/lib/lib.dom.asynciterable.d.ts","./node_modules/typescript/lib/lib.webworker.importscripts.d.ts","./node_modules/typescript/lib/lib.scripthost.d.ts","./node_modules/typescript/lib/lib.es2015.core.d.ts","./node_modules/typescript/lib/lib.es2015.collection.d.ts","./node_modules/typescript/lib/lib.es2015.generator.d.ts","./node_modules/typescript/lib/lib.es2015.iterable.d.ts","./node_modules/typescript/lib/lib.es2015.promise.d.ts","./node_modules/typescript/lib/lib.es2015.proxy.d.ts","./node_modules/typescript/lib/lib.es2015.reflect.d.ts","./node_modules/typescript/lib/lib.es2015.symbol.d.ts","./node_modules/typescript/lib/lib.es2015.symbol.wellknown.d.ts","./node_modules/typescript/lib/lib.es2016.array.include.d.ts","./node_modules/typescript/lib/lib.es2016.intl.d.ts","./node_modules/typescript/lib/lib.es2017.date.d.ts","./node_modules/typescript/lib/lib.es2017.object.d.ts","./node_modules/typescript/lib/lib.es2017.sharedmemory.d.ts","./node_modules/typescript/lib/lib.es2017.string.d.ts","./node_modules/typescript/lib/lib.es2017.intl.d.ts","./node_modules/typescript/lib/lib.es2017.typedarrays.d.ts","./node_modules/typescript/lib/lib.es2018.asyncgenerator.d.ts","./node_modules/typescript/lib/lib.es2018.asynciterable.d.ts","./node_modules/typescript/lib/lib.es2018.intl.d.ts","./node_modules/typescript/lib/lib.es2018.promise.d.ts","./node_modules/typescript/lib/lib.es2018.regexp.d.ts","./node_modules/typescript/lib/lib.es2019.array.d.ts","./node_modules/typescript/lib/lib.es2019.object.d.ts","./node_modules/typescript/lib/lib.es2019.string.d.ts","./node_modules/typescript/lib/lib.es2019.symbol.d.ts","./node_modules/typescript/lib/lib.es2019.intl.d.ts","./node_modules/typescript/lib/lib.es2020.bigint.d.ts","./node_modules/typescript/lib/lib.es2020.date.d.ts","./node_modules/typescript/lib/lib.es2020.promise.d.ts","./node_modules/typescript/lib/lib.es2020.sharedmemory.d.ts","./node_modules/typescript/lib/lib.es2020.string.d.ts","./node_modules/typescript/lib/lib.es2020.symbol.wellknown.d.ts","./node_modules/typescript/lib/lib.es2020.intl.d.ts","./node_modules/typescript/lib/lib.es2020.number.d.ts","./node_modules/typescript/lib/lib.es2021.promise.d.ts","./node_modules/typescript/lib/lib.es2021.string.d.ts","./node_modules/typescript/lib/lib.es2021.weakref.d.ts","./node_modules/typescript/lib/lib.es2021.intl.d.ts","./node_modules/typescript/lib/lib.es2022.array.d.ts","./node_modules/typescript/lib/lib.es2022.error.d.ts","./node_modules/typescript/lib/lib.es2022.intl.d.ts","./node_modules/typescript/lib/lib.es2022.object.d.ts","./node_modules/typescript/lib/lib.es2022.sharedmemory.d.ts","./node_modules/typescript/lib/lib.es2022.string.d.ts","./node_modules/typescript/lib/lib.es2022.regexp.d.ts","./node_modules/typescript/lib/lib.es2023.array.d.ts","./node_modules/typescript/lib/lib.es2023.collection.d.ts","./node_modules/typescript/lib/lib.es2023.intl.d.ts","./node_modules/typescript/lib/lib.esnext.intl.d.ts","./node_modules/typescript/lib/lib.decorators.d.ts","./node_modules/typescript/lib/lib.decorators.legacy.d.ts","./node_modules/typescript/lib/lib.es2023.full.d.ts","./src/lang.ts","../badwords-list/dist/types.d.ts","../badwords-list/dist/array.d.ts","../badwords-list/dist/object.d.ts","../badwords-list/dist/regexp.d.ts","../badwords-list/dist/index.d.ts","./src/badwords.ts","./src/index.ts","./node_modules/@types/node/assert.d.ts","./node_modules/@types/node/assert/strict.d.ts","./node_modules/undici-types/header.d.ts","./node_modules/undici-types/readable.d.ts","./node_modules/undici-types/file.d.ts","./node_modules/undici-types/fetch.d.ts","./node_modules/undici-types/formdata.d.ts","./node_modules/undici-types/connector.d.ts","./node_modules/undici-types/client.d.ts","./node_modules/undici-types/errors.d.ts","./node_modules/undici-types/dispatcher.d.ts","./node_modules/undici-types/global-dispatcher.d.ts","./node_modules/undici-types/global-origin.d.ts","./node_modules/undici-types/pool-stats.d.ts","./node_modules/undici-types/pool.d.ts","./node_modules/undici-types/handlers.d.ts","./node_modules/undici-types/balanced-pool.d.ts","./node_modules/undici-types/agent.d.ts","./node_modules/undici-types/mock-interceptor.d.ts","./node_modules/undici-types/mock-agent.d.ts","./node_modules/undici-types/mock-client.d.ts","./node_modules/undici-types/mock-pool.d.ts","./node_modules/undici-types/mock-errors.d.ts","./node_modules/undici-types/proxy-agent.d.ts","./node_modules/undici-types/retry-handler.d.ts","./node_modules/undici-types/retry-agent.d.ts","./node_modules/undici-types/api.d.ts","./node_modules/undici-types/util.d.ts","./node_modules/undici-types/cookies.d.ts","./node_modules/undici-types/patch.d.ts","./node_modules/undici-types/websocket.d.ts","./node_modules/undici-types/eventsource.d.ts","./node_modules/undici-types/filereader.d.ts","./node_modules/undici-types/diagnostics-channel.d.ts","./node_modules/undici-types/content-type.d.ts","./node_modules/undici-types/cache.d.ts","./node_modules/undici-types/interceptors.d.ts","./node_modules/undici-types/index.d.ts","./node_modules/@types/node/globals.d.ts","./node_modules/@types/node/async_hooks.d.ts","./node_modules/@types/node/buffer.d.ts","./node_modules/@types/node/child_process.d.ts","./node_modules/@types/node/cluster.d.ts","./node_modules/@types/node/console.d.ts","./node_modules/@types/node/constants.d.ts","./node_modules/@types/node/crypto.d.ts","./node_modules/@types/node/dgram.d.ts","./node_modules/@types/node/diagnostics_channel.d.ts","./node_modules/@types/node/dns.d.ts","./node_modules/@types/node/dns/promises.d.ts","./node_modules/@types/node/domain.d.ts","./node_modules/@types/node/dom-events.d.ts","./node_modules/@types/node/events.d.ts","./node_modules/@types/node/fs.d.ts","./node_modules/@types/node/fs/promises.d.ts","./node_modules/@types/node/http.d.ts","./node_modules/@types/node/http2.d.ts","./node_modules/@types/node/https.d.ts","./node_modules/@types/node/inspector.d.ts","./node_modules/@types/node/module.d.ts","./node_modules/@types/node/net.d.ts","./node_modules/@types/node/os.d.ts","./node_modules/@types/node/path.d.ts","./node_modules/@types/node/perf_hooks.d.ts","./node_modules/@types/node/process.d.ts","./node_modules/@types/node/punycode.d.ts","./node_modules/@types/node/querystring.d.ts","./node_modules/@types/node/readline.d.ts","./node_modules/@types/node/readline/promises.d.ts","./node_modules/@types/node/repl.d.ts","./node_modules/@types/node/sea.d.ts","./node_modules/@types/node/stream.d.ts","./node_modules/@types/node/stream/promises.d.ts","./node_modules/@types/node/stream/consumers.d.ts","./node_modules/@types/node/stream/web.d.ts","./node_modules/@types/node/string_decoder.d.ts","./node_modules/@types/node/test.d.ts","./node_modules/@types/node/timers.d.ts","./node_modules/@types/node/timers/promises.d.ts","./node_modules/@types/node/tls.d.ts","./node_modules/@types/node/trace_events.d.ts","./node_modules/@types/node/tty.d.ts","./node_modules/@types/node/url.d.ts","./node_modules/@types/node/util.d.ts","./node_modules/@types/node/v8.d.ts","./node_modules/@types/node/vm.d.ts","./node_modules/@types/node/wasi.d.ts","./node_modules/@types/node/worker_threads.d.ts","./node_modules/@types/node/zlib.d.ts","./node_modules/@types/node/globals.global.d.ts","./node_modules/@types/node/index.d.ts"],"fileInfos":[{"version":"44e584d4f6444f58791784f1d530875970993129442a847597db702a073ca68c","affectsGlobalScope":true},"45b7ab580deca34ae9729e97c13cfd999df04416a79116c3bfb483804f85ded4","3facaf05f0c5fc569c5649dd359892c98a85557e3e0c847964caeb67076f4d75","9a68c0c07ae2fa71b44384a839b7b8d81662a236d4b9ac30916718f7510b1b2d","5e1c4c362065a6b95ff952c0eab010f04dcd2c3494e813b493ecfd4fcb9fc0d8","68d73b4a11549f9c0b7d352d10e91e5dca8faa3322bfb77b661839c42b1ddec7","5efce4fc3c29ea84e8928f97adec086e3dc876365e0982cc8479a07954a3efd4","feecb1be483ed332fad555aff858affd90a48ab19ba7272ee084704eb7167569","5514e54f17d6d74ecefedc73c504eadffdeda79c7ea205cf9febead32d45c4bc","27bdc30a0e32783366a5abeda841bc22757c1797de8681bbe81fbc735eeb1c10",{"version":"4af6b0c727b7a2896463d512fafd23634229adf69ac7c00e2ae15a09cb084fad","affectsGlobalScope":true},{"version":"9c00a480825408b6a24c63c1b71362232927247595d7c97659bc24dc68ae0757","affectsGlobalScope":true},{"version":"0c9e4447ddca10e8097a736ce41bb37ac3389ede46e419ee78c1161a14e9e8ba","affectsGlobalScope":true},{"version":"80e18897e5884b6723488d4f5652167e7bb5024f946743134ecc4aa4ee731f89","affectsGlobalScope":true},{"version":"cd034f499c6cdca722b60c04b5b1b78e058487a7085a8e0d6fb50809947ee573","affectsGlobalScope":true},{"version":"6920e1448680767498a0b77c6a00a8e77d14d62c3da8967b171f1ddffa3c18e4","affectsGlobalScope":true},{"version":"dc2df20b1bcdc8c2d34af4926e2c3ab15ffe1160a63e58b7e09833f616efff44","affectsGlobalScope":true},{"version":"4443e68b35f3332f753eacc66a04ac1d2053b8b035a0e0ac1d455392b5e243b3","affectsGlobalScope":true},{"version":"bc47685641087c015972a3f072480889f0d6c65515f12bd85222f49a98952ed7","affectsGlobalScope":true},{"version":"0dc1e7ceda9b8b9b455c3a2d67b0412feab00bd2f66656cd8850e8831b08b537","affectsGlobalScope":true},{"version":"ce691fb9e5c64efb9547083e4a34091bcbe5bdb41027e310ebba8f7d96a98671","affectsGlobalScope":true},{"version":"8d697a2a929a5fcb38b7a65594020fcef05ec1630804a33748829c5ff53640d0","affectsGlobalScope":true},{"version":"4ff2a353abf8a80ee399af572debb8faab2d33ad38c4b4474cff7f26e7653b8d","affectsGlobalScope":true},{"version":"93495ff27b8746f55d19fcbcdbaccc99fd95f19d057aed1bd2c0cafe1335fbf0","affectsGlobalScope":true},{"version":"6fc23bb8c3965964be8c597310a2878b53a0306edb71d4b5a4dfe760186bcc01","affectsGlobalScope":true},{"version":"ea011c76963fb15ef1cdd7ce6a6808b46322c527de2077b6cfdf23ae6f5f9ec7","affectsGlobalScope":true},{"version":"38f0219c9e23c915ef9790ab1d680440d95419ad264816fa15009a8851e79119","affectsGlobalScope":true},{"version":"bb42a7797d996412ecdc5b2787720de477103a0b2e53058569069a0e2bae6c7e","affectsGlobalScope":true},{"version":"4738f2420687fd85629c9efb470793bb753709c2379e5f85bc1815d875ceadcd","affectsGlobalScope":true},{"version":"2f11ff796926e0832f9ae148008138ad583bd181899ab7dd768a2666700b1893","affectsGlobalScope":true},{"version":"4de680d5bb41c17f7f68e0419412ca23c98d5749dcaaea1896172f06435891fc","affectsGlobalScope":true},{"version":"9fc46429fbe091ac5ad2608c657201eb68b6f1b8341bd6d670047d32ed0a88fa","affectsGlobalScope":true},{"version":"61c37c1de663cf4171e1192466e52c7a382afa58da01b1dc75058f032ddf0839","affectsGlobalScope":true},{"version":"b541a838a13f9234aba650a825393ffc2292dc0fc87681a5d81ef0c96d281e7a","affectsGlobalScope":true},{"version":"9e9fbd7030c440b33d021da145d3232984c8bb7916f277e8ffd3dc2e3eae2bdb","affectsGlobalScope":true},{"version":"811ec78f7fefcabbda4bfa93b3eb67d9ae166ef95f9bff989d964061cbf81a0c","affectsGlobalScope":true},{"version":"717937616a17072082152a2ef351cb51f98802fb4b2fdabd32399843875974ca","affectsGlobalScope":true},{"version":"d7e7d9b7b50e5f22c915b525acc5a49a7a6584cf8f62d0569e557c5cfc4b2ac2","affectsGlobalScope":true},{"version":"71c37f4c9543f31dfced6c7840e068c5a5aacb7b89111a4364b1d5276b852557","affectsGlobalScope":true},{"version":"576711e016cf4f1804676043e6a0a5414252560eb57de9faceee34d79798c850","affectsGlobalScope":true},{"version":"89c1b1281ba7b8a96efc676b11b264de7a8374c5ea1e6617f11880a13fc56dc6","affectsGlobalScope":true},{"version":"74f7fa2d027d5b33eb0471c8e82a6c87216223181ec31247c357a3e8e2fddc5b","affectsGlobalScope":true},{"version":"ae37d6ccd1560b0203ab88d46987393adaaa78c919e51acf32fb82c86502e98c","affectsGlobalScope":true},{"version":"063600664504610fe3e99b717a1223f8b1900087fab0b4cad1496a114744f8df","affectsGlobalScope":true},{"version":"934019d7e3c81950f9a8426d093458b65d5aff2c7c1511233c0fd5b941e608ab","affectsGlobalScope":true},{"version":"bf14a426dbbf1022d11bd08d6b8e709a2e9d246f0c6c1032f3b2edb9a902adbe","affectsGlobalScope":true},{"version":"5e07ed3809d48205d5b985642a59f2eba47c402374a7cf8006b686f79efadcbd","affectsGlobalScope":true},{"version":"2b72d528b2e2fe3c57889ca7baef5e13a56c957b946906d03767c642f386bbc3","affectsGlobalScope":true},{"version":"479553e3779be7d4f68e9f40cdb82d038e5ef7592010100410723ceced22a0f7","affectsGlobalScope":true},{"version":"368af93f74c9c932edd84c58883e736c9e3d53cec1fe24c0b0ff451f529ceab1","affectsGlobalScope":true},{"version":"af3dd424cf267428f30ccfc376f47a2c0114546b55c44d8c0f1d57d841e28d74","affectsGlobalScope":true},{"version":"995c005ab91a498455ea8dfb63aa9f83fa2ea793c3d8aa344be4a1678d06d399","affectsGlobalScope":true},{"version":"d3d7b04b45033f57351c8434f60b6be1ea71a2dfec2d0a0c3c83badbb0e3e693","affectsGlobalScope":true},{"version":"956d27abdea9652e8368ce029bb1e0b9174e9678a273529f426df4b3d90abd60","affectsGlobalScope":true},{"version":"4fa6ed14e98aa80b91f61b9805c653ee82af3502dc21c9da5268d3857772ca05","affectsGlobalScope":true},{"version":"e6633e05da3ff36e6da2ec170d0d03ccf33de50ca4dc6f5aeecb572cedd162fb","affectsGlobalScope":true},{"version":"d8670852241d4c6e03f2b89d67497a4bbefe29ecaa5a444e2c11a9b05e6fccc6","affectsGlobalScope":true},{"version":"8444af78980e3b20b49324f4a16ba35024fef3ee069a0eb67616ea6ca821c47a","affectsGlobalScope":true},{"version":"caccc56c72713969e1cfe5c3d44e5bab151544d9d2b373d7dbe5a1e4166652be","affectsGlobalScope":true},{"version":"3287d9d085fbd618c3971944b65b4be57859f5415f495b33a6adc994edd2f004","affectsGlobalScope":true},{"version":"b4b67b1a91182421f5df999988c690f14d813b9850b40acd06ed44691f6727ad","affectsGlobalScope":true},{"version":"9d540251809289a05349b70ab5f4b7b99f922af66ab3c39ba56a475dcf95d5ff","affectsGlobalScope":true},{"version":"436aaf437562f276ec2ddbee2f2cdedac7664c1e4c1d2c36839ddd582eeb3d0a","affectsGlobalScope":true},{"version":"8e3c06ea092138bf9fa5e874a1fdbc9d54805d074bee1de31b99a11e2fec239d","affectsGlobalScope":true},{"version":"811c71eee4aa0ac5f7adf713323a5c41b0cf6c4e17367a34fbce379e12bbf0a4","affectsGlobalScope":true},{"version":"33358442698bb565130f52ba79bfd3d4d484ac85fe33f3cb1759c54d18201393","affectsGlobalScope":true},{"version":"782dec38049b92d4e85c1585fbea5474a219c6984a35b004963b00beb1aab538","affectsGlobalScope":true},"785921608325fa246b450f05b238f4b3ed659f1099af278ce9ebbc9416a13f1d",{"version":"5e9512fe7afdd01cfbaf15f8b97344bddee2f536fc6732de6c2ca290820a9db4","signature":"131e17eb2e429933f4c174f0936835e5e6ea0ef19ec54847c52078a4df44acc6"},"b081a0d902cb1df09d2a4258568838d6ac39c0d681ac6116b48aecf9f121e714","9409aab6c59ddf18345ae6e48ce9e74771e2178edfd73a1d33b23592dadf739c","414140b7ac54fc3ac5565ce433b59fc900bd74929c55fc21da8c596580884a24","27007e5382dddc1d802d78b46c55b14de76c5f9848966711f7daf15bcc4903e4","aa91bbb8241231aa12ca586eb4351a7b081d5958387e43da96adb7a31e606662",{"version":"eafdce33dee2174976abccfcd4d26951008918d51c788d99e90d9f627a9e9e75","signature":"bef83b1b1d980a66398ee5ad6d6bf99c6d8cddc6094098db4d039d2f21e3e471"},{"version":"69603af8da57b8d06d068b2ff7e54f09bcbe578c967ec0cb62cc29f864e3609e","signature":"c641d3e6c3c4d8a3b1c22f7c4150f74eb6af645500699ce0c92e47444777f3b5"},"e142fda89ed689ea53d6f2c93693898464c7d29a0ae71c6dc8cdfe5a1d76c775","7394959e5a741b185456e1ef5d64599c36c60a323207450991e7a42e08911419","5929864ce17fba74232584d90cb721a89b7ad277220627cc97054ba15a98ea8f","24bd580b5743dc56402c440dc7f9a4f5d592ad7a419f25414d37a7bfe11e342b","25c8056edf4314820382a5fdb4bb7816999acdcb929c8f75e3f39473b87e85bc","34b4f256dd3c591cb7c9e96a763d79d54b69d417709b9015dcec3ac5583eec73","3e4825171442666d31c845aeb47fcd34b62e14041bb353ae2b874285d78482aa","c6fd2c5a395f2432786c9cb8deb870b9b0e8ff7e22c029954fabdd692bff6195","1d6e127068ea8e104a912e42fc0a110e2aa5a66a356a917a163e8cf9a65e4a75","e9775e97ac4877aebf963a0289c81abe76d1ec9a2a7778dbe637e5151f25c5f3","57386628c539248e4f428d5308a69f98f4a6a3cd42a053f017d9dd3fd5a43bc5","cadc8aced301244057c4e7e73fbcae534b0f5b12a37b150d80e5a45aa4bebcbd","385aab901643aa54e1c36f5ef3107913b10d1b5bb8cbcd933d4263b80a0d7f20","9670d44354bab9d9982eca21945686b5c24a3f893db73c0dae0fd74217a4c219","0b8a9268adaf4da35e7fa830c8981cfa22adbbe5b3f6f5ab91f6658899e657a7","11396ed8a44c02ab9798b7dca436009f866e8dae3c9c25e8c1fbc396880bf1bb","ba7bc87d01492633cb5a0e5da8a4a42a1c86270e7b3d2dea5d156828a84e4882","4893a895ea92c85345017a04ed427cbd6a1710453338df26881a6019432febdd","3a84b7cb891141824bd00ef8a50b6a44596aded4075da937f180c90e362fe5f6","13f6f39e12b1518c6650bbb220c8985999020fe0f21d818e28f512b7771d00f9","9b5369969f6e7175740bf51223112ff209f94ba43ecd3bb09eefff9fd675624a","4fe9e626e7164748e8769bbf74b538e09607f07ed17c2f20af8d680ee49fc1da","24515859bc0b836719105bb6cc3d68255042a9f02a6022b3187948b204946bd2","ea0148f897b45a76544ae179784c95af1bd6721b8610af9ffa467a518a086a43","dd3273ead9fbde62a72949c97dbec2247ea08e0c6952e701a483d74ef92d6a17","8b9bf58d580d9b36ab2f23178c88757ce7cc6830ccbdd09e8a76f4cb1bc0fcf7","0db18c6e78ea846316c012478888f33c11ffadab9efd1cc8bcc12daded7a60b6","7782678102bd835ef2c54330ee16c31388e51dfd9ca535b47f6fd8f3d6e07993","89167d696a849fce5ca508032aabfe901c0868f833a8625d5a9c6e861ef935d2","e53a3c2a9f624d90f24bf4588aacd223e7bec1b9d0d479b68d2f4a9e6011147f","24b8685c62562f5d98615c5a0c1d05f297cf5065f15246edfe99e81ec4c0e011","1a42891defae8cec268a4f8903140dbf0d214c0cf9ed8fdc1eb6c25e5b3e9a5c","339dc5265ee5ed92e536a93a04c4ebbc2128f45eeec6ed29f379e0085283542c","4732aec92b20fb28c5fe9ad99521fb59974289ed1e45aecb282616202184064f","2e85db9e6fd73cfa3d7f28e0ab6b55417ea18931423bd47b409a96e4a169e8e6","c46e079fe54c76f95c67fb89081b3e399da2c7d109e7dca8e4b58d83e332e605","d32275be3546f252e3ad33976caf8c5e842c09cb87d468cb40d5f4cf092d1acc","37e97c64b890352421ccb29cd8ede863774df8f03763416f6a572093f6058284",{"version":"6f73fc82f51bcdf0487fc982f062eeadae02e0251dd2e4c444043edb247a7d3b","affectsGlobalScope":true},"db3ec8993b7596a4ef47f309c7b25ee2505b519c13050424d9c34701e5973315",{"version":"e7f13a977b01cc54adb4408a9265cda9ddf11db878d70f4f3cac64bef00062e6","affectsGlobalScope":true},"af49b066a76ce26673fe49d1885cc6b44153f1071ed2d952f2a90fccba1095c9","f22fd1dc2df53eaf5ce0ff9e0a3326fc66f880d6a652210d50563ae72625455f",{"version":"3ddbdb519e87a7827c4f0c4007013f3628ca0ebb9e2b018cf31e5b2f61c593f1","affectsGlobalScope":true},"a40826e8476694e90da94aa008283a7de50d1dafd37beada623863f1901cb7fb",{"version":"6d498d4fd8036ea02a4edcae10375854a0eb1df0496cf0b9d692577d3c0fd603","affectsGlobalScope":true},"24642567d3729bcc545bacb65ee7c0db423400c7f1ef757cab25d05650064f98","fd09b892597ab93e7f79745ce725a3aaf6dd005e8db20f0c63a5d10984cba328","a3be878ff1e1964ab2dc8e0a3b67087cf838731c7f3d8f603337e7b712fdd558","5433f7f77cd1fd53f45bd82445a4e437b2f6a72a32070e907530a4fea56c30c8","9be74296ee565af0c12d7071541fdd23260f53c3da7731fb6361f61150a791f6",{"version":"ee1ee365d88c4c6c0c0a5a5701d66ebc27ccd0bcfcfaa482c6e2e7fe7b98edf7","affectsGlobalScope":true},{"version":"f501a53b94ba382d9ba396a5c486969a3abc68309828fa67f916035f5d37fe2b","affectsGlobalScope":true},"aa658b5d765f630c312ac9202d110bbaf2b82d180376457f0a9d57b42629714a","312ac7cbd070107766a9886fd27f9faad997ef57d93fdfb4095df2c618ac8162","bcfcff784a59db3f323c25cea5ae99a903ca9292c060f2c7e470ea73aaf71b44","672ad3045f329e94002256f8ed460cfd06173a50c92cde41edaadfacffd16808","64da4965d1e0559e134d9c1621ae400279a216f87ed00c4cce4f2c7c78021712","ddbf3aac94f85dbb8e4d0360782e60020da75a0becfc0d3c69e437c645feb30f",{"version":"0166fce1204d520fdfd6b5febb3cda3deee438bcbf8ce9ffeb2b1bcde7155346","affectsGlobalScope":true},"d8b13eab85b532285031b06a971fa051bf0175d8fff68065a24a6da9c1c986cf","50c382ba1827988c59aa9cc9d046e386d55d70f762e9e352e95ee8cb7337cdb8","2178ab4b68402d1de2dda199d3e4a55f7200e3334f5a9727fbd9d16975cdf75f",{"version":"21d7e87f271e72d02f8d167edc902f90b04525edc7918f00f01dd0bd00599f7e","affectsGlobalScope":true},{"version":"9e523e73ee7dd119d99072fd855404efc33938c168063771528bd1deb6df56d2","affectsGlobalScope":true},"a215554477f7629e3dcbc8cde104bec036b78673650272f5ffdc5a2cee399a0a","c3497fc242aabfedcd430b5932412f94f157b5906568e737f6a18cc77b36a954","cdc1de3b672f9ef03ff15c443aa1b631edca35b6ae6970a7da6400647ff74d95","139ad1dc93a503da85b7a0d5f615bddbae61ad796bc68fedd049150db67a1e26","bf01fdd3b93cf633b3f7420718457af19c57ab8cbfea49268df60bae2e84d627","15c5e91b5f08be34a78e3d976179bf5b7a9cc28dc0ef1ffebffeb3c7812a2dca","65b39cc6b610a4a4aecc321f6efb436f10c0509d686124795b4c36a5e915b89e","269929a24b2816343a178008ac9ae9248304d92a8ba8e233055e0ed6dbe6ef71","93452d394fdd1dc551ec62f5042366f011a00d342d36d50793b3529bfc9bd633","3c1f19c7abcda6b3a4cf9438a15c7307a080bd3b51dfd56b198d9f86baf19447","d3edb86744e2c19f2c1503849ac7594a5e06024f2451bacae032390f2e20314a",{"version":"97a1d365f71c72ebc3256b0fb8ada716f70c7482309535b7a56c78e651f18b33","affectsGlobalScope":true},{"version":"8a3e61347b8f80aa5af532094498bceb0c0b257b25a6aa8ab4880fd6ed57c95a","affectsGlobalScope":true},"98e00f3613402504bc2a2c9a621800ab48e0a463d1eed062208a4ae98ad8f84c","4301becc26a79eb5f4552f7bee356c2534466d3b5cd68b71523e1929d543de89","5475df7cfc493a08483c9d7aa61cc04791aecba9d0a2efc213f23c4006d4d3cd","000720870b275764c65e9f28ac97cc9e4d9e4a36942d4750ca8603e416e9c57c",{"version":"54412c70bacb9ed547ed6caae8836f712a83ccf58d94466f3387447ec4e82dc3","affectsGlobalScope":true},{"version":"1d274b8bb8ca011148f87e128392bfcd17a12713b6a4e843f0fa9f3f6b45e2b1","affectsGlobalScope":true},"4c48e931a72f6971b5add7fdb1136be1d617f124594e94595f7114af749395e0","478eb5c32250678a906d91e0529c70243fc4d75477a08f3da408e2615396f558","e686a88c9ee004c8ba12ffc9d674ca3192a4c50ed0ca6bd5b2825c289e2b2bfe",{"version":"98d547613610452ac9323fb9ec4eafc89acab77644d6e23105b3c94913f712b3","affectsGlobalScope":true},"4423fb3d6abe6eefb8d7f79eb2df9510824a216ec1c6feee46718c9b18e6d89f",{"version":"ab9b9a36e5284fd8d3bf2f7d5fcbc60052f25f27e4d20954782099282c60d23e","affectsGlobalScope":true},"a42be67ed1ddaec743582f41fc219db96a1b69719fccac6d1464321178d610fc"],"root":[69,75,76],"options":{"declaration":true,"module":1,"outDir":"./dist","rootDir":"./src","strict":true,"target":10},"fileIdsList":[[70],[71,72,73],[77],[116],[117,122,151],[118,123,129,130,137,148,159],[118,119,129,137],[120,160],[121,122,130,138],[122,148,156],[123,125,129,137],[116,124],[125,126],[129],[127,129],[116,129],[129,130,131,148,159],[129,130,131,144,148,151],[114,117,164],[125,129,132,137,148,159],[129,130,132,133,137,148,156,159],[132,134,148,156,159],[77,78,115,116,117,118,119,120,121,122,123,124,125,126,127,128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,160,161,162,163,164,165,166],[129,135],[136,159,164],[125,129,137,148],[138],[139],[116,140],[137,138,141,158,164],[142],[143],[129,144,145],[144,146,160,162],[117,129,148,149,150,151],[117,148,150],[148,149],[151],[152],[77,148],[129,154,155],[154,155],[122,137,148,156],[157],[137,158],[117,132,143,159],[122,160],[148,161],[136,162],[163],[117,122,129,131,140,148,159,162,164],[148,165],[87,91,159],[87,148,159],[82],[84,87,156,159],[137,156],[167],[82,167],[84,87,137,159],[79,80,83,86,117,129,148,159],[79,85],[106,107],[83,87,117,151,159,167],[117,167],[106,117,167],[81,82,167],[87],[81,82,83,84,85,86,87,88,89,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,107,108,109,110,111,112,113],[87,94,95],[85,87,95,96],[86],[79,82,87],[87,91,95,96],[91],[85,87,90,159],[79,84,87,94],[117,148],[79,84,87,94,101],[82,87,106,117,164,167],[69,74],[75]],"referencedMap":[[71,1],[74,2],[72,1],[73,1],[77,3],[78,3],[116,4],[117,5],[118,6],[119,7],[120,8],[121,9],[122,10],[123,11],[124,12],[125,13],[126,13],[128,14],[127,15],[129,16],[130,17],[131,18],[115,19],[132,20],[133,21],[134,22],[167,23],[135,24],[136,25],[137,26],[138,27],[139,28],[140,29],[141,30],[142,31],[143,32],[144,33],[145,33],[146,34],[148,35],[150,36],[149,37],[151,38],[152,39],[153,40],[154,41],[155,42],[156,43],[157,44],[158,45],[159,46],[160,47],[161,48],[162,49],[163,50],[164,51],[165,52],[94,53],[103,54],[93,53],[112,55],[85,56],[84,57],[111,58],[105,59],[110,60],[87,61],[86,62],[108,63],[82,64],[81,65],[109,66],[83,67],[88,68],[92,68],[114,69],[113,68],[96,70],[97,71],[99,72],[95,73],[98,74],[106,58],[90,75],[91,76],[100,77],[80,78],[102,79],[101,68],[107,80],[75,81],[76,82]]},"version":"5.5.4"} --------------------------------------------------------------------------------