├── docs ├── fonts │ ├── Montserrat │ │ ├── Montserrat-Bold.eot │ │ ├── Montserrat-Bold.ttf │ │ ├── Montserrat-Bold.woff │ │ ├── Montserrat-Bold.woff2 │ │ ├── Montserrat-Regular.eot │ │ ├── Montserrat-Regular.ttf │ │ ├── Montserrat-Regular.woff │ │ └── Montserrat-Regular.woff2 │ └── Source-Sans-Pro │ │ ├── sourcesanspro-light-webfont.eot │ │ ├── sourcesanspro-light-webfont.ttf │ │ ├── sourcesanspro-light-webfont.woff │ │ ├── sourcesanspro-light-webfont.woff2 │ │ ├── sourcesanspro-regular-webfont.eot │ │ ├── sourcesanspro-regular-webfont.ttf │ │ ├── sourcesanspro-regular-webfont.woff │ │ ├── sourcesanspro-regular-webfont.woff2 │ │ └── sourcesanspro-light-webfont.svg ├── scripts │ ├── polyfill.js │ ├── nav.js │ ├── linenumber.js │ ├── collapse.js │ ├── prettify │ │ ├── lang-css.js │ │ ├── Apache-License-2.0.txt │ │ └── prettify.js │ └── search.js ├── styles │ ├── prettify.css │ └── jsdoc.css ├── index.js.html ├── index.html ├── filter.js.html ├── global.html └── Filter.html ├── .nycrc.json ├── .eslintrc.js ├── jsdoc.json ├── data └── amharic.json ├── .github └── workflows │ └── node.js.yml ├── LICENSE ├── package.json ├── .gitignore ├── README.md ├── src └── filter.js └── test └── filter.js /docs/fonts/Montserrat/Montserrat-Bold.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Bruk3/obscenity-filter/HEAD/docs/fonts/Montserrat/Montserrat-Bold.eot -------------------------------------------------------------------------------- /docs/fonts/Montserrat/Montserrat-Bold.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Bruk3/obscenity-filter/HEAD/docs/fonts/Montserrat/Montserrat-Bold.ttf -------------------------------------------------------------------------------- /docs/fonts/Montserrat/Montserrat-Bold.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Bruk3/obscenity-filter/HEAD/docs/fonts/Montserrat/Montserrat-Bold.woff -------------------------------------------------------------------------------- /docs/fonts/Montserrat/Montserrat-Bold.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Bruk3/obscenity-filter/HEAD/docs/fonts/Montserrat/Montserrat-Bold.woff2 -------------------------------------------------------------------------------- /docs/fonts/Montserrat/Montserrat-Regular.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Bruk3/obscenity-filter/HEAD/docs/fonts/Montserrat/Montserrat-Regular.eot -------------------------------------------------------------------------------- /docs/fonts/Montserrat/Montserrat-Regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Bruk3/obscenity-filter/HEAD/docs/fonts/Montserrat/Montserrat-Regular.ttf -------------------------------------------------------------------------------- /docs/fonts/Montserrat/Montserrat-Regular.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Bruk3/obscenity-filter/HEAD/docs/fonts/Montserrat/Montserrat-Regular.woff -------------------------------------------------------------------------------- /docs/fonts/Montserrat/Montserrat-Regular.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Bruk3/obscenity-filter/HEAD/docs/fonts/Montserrat/Montserrat-Regular.woff2 -------------------------------------------------------------------------------- /.nycrc.json: -------------------------------------------------------------------------------- 1 | { 2 | "include": "src", 3 | "check-coverage": "true", 4 | "lines": 90, 5 | "branches": 90, 6 | "functions": 90, 7 | "statements": 90 8 | } -------------------------------------------------------------------------------- /docs/fonts/Source-Sans-Pro/sourcesanspro-light-webfont.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Bruk3/obscenity-filter/HEAD/docs/fonts/Source-Sans-Pro/sourcesanspro-light-webfont.eot -------------------------------------------------------------------------------- /docs/fonts/Source-Sans-Pro/sourcesanspro-light-webfont.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Bruk3/obscenity-filter/HEAD/docs/fonts/Source-Sans-Pro/sourcesanspro-light-webfont.ttf -------------------------------------------------------------------------------- /docs/fonts/Source-Sans-Pro/sourcesanspro-light-webfont.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Bruk3/obscenity-filter/HEAD/docs/fonts/Source-Sans-Pro/sourcesanspro-light-webfont.woff -------------------------------------------------------------------------------- /docs/fonts/Source-Sans-Pro/sourcesanspro-light-webfont.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Bruk3/obscenity-filter/HEAD/docs/fonts/Source-Sans-Pro/sourcesanspro-light-webfont.woff2 -------------------------------------------------------------------------------- /docs/fonts/Source-Sans-Pro/sourcesanspro-regular-webfont.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Bruk3/obscenity-filter/HEAD/docs/fonts/Source-Sans-Pro/sourcesanspro-regular-webfont.eot -------------------------------------------------------------------------------- /docs/fonts/Source-Sans-Pro/sourcesanspro-regular-webfont.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Bruk3/obscenity-filter/HEAD/docs/fonts/Source-Sans-Pro/sourcesanspro-regular-webfont.ttf -------------------------------------------------------------------------------- /docs/fonts/Source-Sans-Pro/sourcesanspro-regular-webfont.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Bruk3/obscenity-filter/HEAD/docs/fonts/Source-Sans-Pro/sourcesanspro-regular-webfont.woff -------------------------------------------------------------------------------- /docs/fonts/Source-Sans-Pro/sourcesanspro-regular-webfont.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Bruk3/obscenity-filter/HEAD/docs/fonts/Source-Sans-Pro/sourcesanspro-regular-webfont.woff2 -------------------------------------------------------------------------------- /docs/scripts/polyfill.js: -------------------------------------------------------------------------------- 1 | //IE Fix, src: https://www.reddit.com/r/programminghorror/comments/6abmcr/nodelist_lacks_foreach_in_internet_explorer/ 2 | if (typeof(NodeList.prototype.forEach)!==typeof(alert)){ 3 | NodeList.prototype.forEach=Array.prototype.forEach; 4 | } -------------------------------------------------------------------------------- /.eslintrc.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | env: { 3 | browser: true, 4 | commonjs: true, 5 | es2021: true, 6 | }, 7 | extends: [ 8 | 'airbnb-base', 9 | ], 10 | parserOptions: { 11 | ecmaVersion: 12, 12 | }, 13 | rules: { 14 | quotes: ['error', 'single', { 15 | allowTemplateLiterals: true, 16 | }], 17 | }, 18 | }; 19 | -------------------------------------------------------------------------------- /docs/scripts/nav.js: -------------------------------------------------------------------------------- 1 | function scrollToNavItem() { 2 | var path = window.location.href.split('/').pop().replace(/\.html/, ''); 3 | document.querySelectorAll('nav a').forEach(function(link) { 4 | var href = link.attributes.href.value.replace(/\.html/, ''); 5 | if (path === href) { 6 | link.scrollIntoView({block: 'center'}); 7 | return; 8 | } 9 | }) 10 | } 11 | 12 | scrollToNavItem(); 13 | -------------------------------------------------------------------------------- /jsdoc.json: -------------------------------------------------------------------------------- 1 | { 2 | "tags": { 3 | "allowUnknownTags": false 4 | }, 5 | "source": { 6 | "include": ["src/", "README.md"], 7 | "includePattern": "\\.js$", 8 | "excludePattern": "(node_modules/|docs)" 9 | }, 10 | "plugins": [ 11 | "plugins/markdown" 12 | ], 13 | "opts": { 14 | "template": ".templates/docdash/", 15 | "encoding": "utf8", 16 | "destination": "docs/", 17 | "recurse": true, 18 | "verbose": true 19 | }, 20 | "templates": { 21 | "cleverLinks": false, 22 | "monospaceLinks": false 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /docs/scripts/linenumber.js: -------------------------------------------------------------------------------- 1 | /*global document */ 2 | (function() { 3 | var source = document.getElementsByClassName('prettyprint source linenums'); 4 | var i = 0; 5 | var lineNumber = 0; 6 | var lineId; 7 | var lines; 8 | var totalLines; 9 | var anchorHash; 10 | 11 | if (source && source[0]) { 12 | anchorHash = document.location.hash.substring(1); 13 | lines = source[0].getElementsByTagName('li'); 14 | totalLines = lines.length; 15 | 16 | for (; i < totalLines; i++) { 17 | lineNumber++; 18 | lineId = 'line' + lineNumber; 19 | lines[i].id = lineId; 20 | if (lineId === anchorHash) { 21 | lines[i].className += ' selected'; 22 | } 23 | } 24 | } 25 | })(); 26 | -------------------------------------------------------------------------------- /docs/scripts/collapse.js: -------------------------------------------------------------------------------- 1 | function hideAllButCurrent(){ 2 | //by default all submenut items are hidden 3 | //but we need to rehide them for search 4 | document.querySelectorAll("nav > ul > li > ul li").forEach(function(parent) { 5 | parent.style.display = "none"; 6 | }); 7 | 8 | //only current page (if it exists) should be opened 9 | var file = window.location.pathname.split("/").pop().replace(/\.html/, ''); 10 | document.querySelectorAll("nav > ul > li > a").forEach(function(parent) { 11 | var href = parent.attributes.href.value.replace(/\.html/, ''); 12 | if (file === href) { 13 | parent.parentNode.querySelectorAll("ul li").forEach(function(elem) { 14 | elem.style.display = "block"; 15 | }); 16 | } 17 | }); 18 | } 19 | 20 | hideAllButCurrent(); -------------------------------------------------------------------------------- /data/amharic.json: -------------------------------------------------------------------------------- 1 | { 2 | "labels": { 3 | "PN": "pornographic", 4 | "RT": "racist", 5 | "IN": "insulting", 6 | "NO": "NONE" 7 | }, 8 | "words": { 9 | "ደደብ": ["IN"], 10 | "ቅምጥ": ["PN"], 11 | "ብድ": ["PN"], 12 | "ብዳታም": ["PN", "IN"], 13 | "መበዳት": ["PN"], 14 | "መብዳት": ["PN"], 15 | "መባዳት": ["PN"], 16 | "ብዱኝ": ["PN"], 17 | "በዱኝ": ["PN"], 18 | "በዳችው": ["PN"], 19 | "አበዳድ": ["PN"], 20 | "ልብዳሽ": ["PN", "IN"], 21 | "ልብዳህ": ["PN", "IN"], 22 | "ልብዳቹ": ["PN", "IN"], 23 | "ልብዳቹህ": ["PN", "IN"], 24 | "ጀላ": ["PN"], 25 | "ጀላው": ["PN"], 26 | "ቂንጥር": ["PN"], 27 | "ቂንጥሬን": ["PN"], 28 | "ቂንጥፘን": ["PN"], 29 | "ጲላ": ["IN", "RT"], 30 | "ጋላ": ["IN", "RT"] 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /.github/workflows/node.js.yml: -------------------------------------------------------------------------------- 1 | # This workflow will do a clean install of node dependencies, build the source code and run tests across different versions of node 2 | # For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions 3 | 4 | name: CI 5 | 6 | on: 7 | push: 8 | branches: [ main ] 9 | pull_request: 10 | branches: [ main ] 11 | 12 | jobs: 13 | build: 14 | 15 | runs-on: ubuntu-latest 16 | 17 | strategy: 18 | matrix: 19 | node-version: [12.x] 20 | 21 | steps: 22 | - uses: actions/checkout@v2 23 | - name: Use Node.js ${{ matrix.node-version }} 24 | uses: actions/setup-node@v1 25 | with: 26 | node-version: ${{ matrix.node-version }} 27 | - run: npm ci 28 | - run: npm run lint 29 | - run: npm run test 30 | - run: npm run coverage -------------------------------------------------------------------------------- /docs/scripts/prettify/lang-css.js: -------------------------------------------------------------------------------- 1 | PR.registerLangHandler(PR.createSimpleLexer([["pln",/^[\t\n\f\r ]+/,null," \t\r\n "]],[["str",/^"(?:[^\n\f\r"\\]|\\(?:\r\n?|\n|\f)|\\[\S\s])*"/,null],["str",/^'(?:[^\n\f\r'\\]|\\(?:\r\n?|\n|\f)|\\[\S\s])*'/,null],["lang-css-str",/^url\(([^"')]*)\)/i],["kwd",/^(?:url|rgb|!important|@import|@page|@media|@charset|inherit)(?=[^\w-]|$)/i,null],["lang-css-kw",/^(-?(?:[_a-z]|\\[\da-f]+ ?)(?:[\w-]|\\\\[\da-f]+ ?)*)\s*:/i],["com",/^\/\*[^*]*\*+(?:[^*/][^*]*\*+)*\//],["com", 2 | /^(?:<\!--|--\>)/],["lit",/^(?:\d+|\d*\.\d+)(?:%|[a-z]+)?/i],["lit",/^#[\da-f]{3,6}/i],["pln",/^-?(?:[_a-z]|\\[\da-f]+ ?)(?:[\w-]|\\\\[\da-f]+ ?)*/i],["pun",/^[^\s\w"']+/]]),["css"]);PR.registerLangHandler(PR.createSimpleLexer([],[["kwd",/^-?(?:[_a-z]|\\[\da-f]+ ?)(?:[\w-]|\\\\[\da-f]+ ?)*/i]]),["css-kw"]);PR.registerLangHandler(PR.createSimpleLexer([],[["str",/^[^"')]+/]]),["css-str"]); 3 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2020 Bruk B Zewdie 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, 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, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /docs/styles/prettify.css: -------------------------------------------------------------------------------- 1 | .pln { 2 | color: #ddd; 3 | } 4 | 5 | /* string content */ 6 | .str { 7 | color: #61ce3c; 8 | } 9 | 10 | /* a keyword */ 11 | .kwd { 12 | color: #fbde2d; 13 | } 14 | 15 | /* a comment */ 16 | .com { 17 | color: #aeaeae; 18 | } 19 | 20 | /* a type name */ 21 | .typ { 22 | color: #8da6ce; 23 | } 24 | 25 | /* a literal value */ 26 | .lit { 27 | color: #fbde2d; 28 | } 29 | 30 | /* punctuation */ 31 | .pun { 32 | color: #ddd; 33 | } 34 | 35 | /* lisp open bracket */ 36 | .opn { 37 | color: #000000; 38 | } 39 | 40 | /* lisp close bracket */ 41 | .clo { 42 | color: #000000; 43 | } 44 | 45 | /* a markup tag name */ 46 | .tag { 47 | color: #8da6ce; 48 | } 49 | 50 | /* a markup attribute name */ 51 | .atn { 52 | color: #fbde2d; 53 | } 54 | 55 | /* a markup attribute value */ 56 | .atv { 57 | color: #ddd; 58 | } 59 | 60 | /* a declaration */ 61 | .dec { 62 | color: #EF5050; 63 | } 64 | 65 | /* a variable name */ 66 | .var { 67 | color: #c82829; 68 | } 69 | 70 | /* a function name */ 71 | .fun { 72 | color: #4271ae; 73 | } 74 | 75 | /* Specify class=linenums on a pre to get line numbering */ 76 | ol.linenums { 77 | margin-top: 0; 78 | margin-bottom: 0; 79 | } 80 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "obscenity-filter", 3 | "version": "v0.1.0", 4 | "description": "An obscenity filter library with multiple language support", 5 | "main": "index.js", 6 | "scripts": { 7 | "test": "mocha", 8 | "lint": "./node_modules/.bin/eslint test/*.js src/*.js", 9 | "lint-fix": "./node_modules/.bin/eslint test/*.js src/*.js --fix", 10 | "coverage": "nyc --reporter=lcov --reporter=text npm run test", 11 | "build-doc": "./node_modules/.bin/jsdoc -c jsdoc.json" 12 | }, 13 | "repository": { 14 | "type": "git", 15 | "url": "git+https://github.com/Bruk3/obscenity-filter.git" 16 | }, 17 | "author": "Bruk B Zewdie", 18 | "license": "MIT", 19 | "bugs": { 20 | "url": "https://github.com/Bruk3/obscenity-filter/issues" 21 | }, 22 | "homepage": "https://github.com/Bruk3/obscenity-filter#readme", 23 | "devDependencies": { 24 | "docdash": "^1.2.0", 25 | "eslint": "^7.13.0", 26 | "eslint-config-airbnb-base": "^14.2.1", 27 | "eslint-plugin-import": "^2.22.1", 28 | "jsdoc": "^3.6.6", 29 | "minami": "^1.2.3", 30 | "nyc": "^15.1.0", 31 | "prettier": "^2.1.2" 32 | }, 33 | "dependencies": { 34 | "chai": "^4.2.0", 35 | "mocha": "^8.2.1" 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # Logs 2 | logs 3 | *.log 4 | npm-debug.log* 5 | yarn-debug.log* 6 | yarn-error.log* 7 | lerna-debug.log* 8 | 9 | # Diagnostic reports (https://nodejs.org/api/report.html) 10 | report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json 11 | 12 | # Runtime data 13 | pids 14 | *.pid 15 | *.seed 16 | *.pid.lock 17 | 18 | # Directory for instrumented libs generated by jscoverage/JSCover 19 | lib-cov 20 | 21 | # Coverage directory used by tools like istanbul 22 | coverage 23 | *.lcov 24 | 25 | # sphinx docs 26 | docs/build 27 | docs/source/_static 28 | docs/source/_templates 29 | 30 | # nyc test coverage 31 | .nyc_output 32 | 33 | # Grunt intermediate storage (https://gruntjs.com/creating-plugins#storing-task-files) 34 | .grunt 35 | 36 | # Bower dependency directory (https://bower.io/) 37 | bower_components 38 | 39 | # node-waf configuration 40 | .lock-wscript 41 | 42 | # Compiled binary addons (https://nodejs.org/api/addons.html) 43 | build/Release 44 | 45 | # Dependency directories 46 | node_modules/ 47 | jspm_packages/ 48 | 49 | # TypeScript v1 declaration files 50 | typings/ 51 | 52 | # TypeScript cache 53 | *.tsbuildinfo 54 | 55 | # Optional npm cache directory 56 | .npm 57 | 58 | # Optional eslint cache 59 | .eslintcache 60 | 61 | # Microbundle cache 62 | .rpt2_cache/ 63 | .rts2_cache_cjs/ 64 | .rts2_cache_es/ 65 | .rts2_cache_umd/ 66 | 67 | # Optional REPL history 68 | .node_repl_history 69 | 70 | # Output of 'npm pack' 71 | *.tgz 72 | 73 | # Yarn Integrity file 74 | .yarn-integrity 75 | 76 | # dotenv environment variables file 77 | .env 78 | .env.test 79 | 80 | # parcel-bundler cache (https://parceljs.org/) 81 | .cache 82 | 83 | # Next.js build output 84 | .next 85 | 86 | # Nuxt.js build / generate output 87 | .nuxt 88 | dist 89 | 90 | # Gatsby files 91 | .cache/ 92 | # Comment in the public line in if your project uses Gatsby and *not* Next.js 93 | # https://nextjs.org/blog/next-9-1#public-directory-support 94 | # public 95 | 96 | # vuepress build output 97 | .vuepress/dist 98 | 99 | # Serverless directories 100 | .serverless/ 101 | 102 | # FuseBox cache 103 | .fusebox/ 104 | 105 | # DynamoDB Local files 106 | .dynamodb/ 107 | 108 | # TernJS port file 109 | .tern-port 110 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # obscenity-filter 2 | 3 | 4 | #### What is it? 5 | A javascript library that detects obscene Amharic words and phrases. 6 | 7 | ### An obscenity filter library for the Amharic langauge. 8 | ![GitHub](https://img.shields.io/github/license/bruk3/obscenity-filter) 9 | ![GitHub Workflow Status (branch)](https://img.shields.io/github/workflow/status/bruk3/obscenity-filter/CI/main) 10 | ![nycrc config on GitHub](https://img.shields.io/nycrc/bruk3/obscenity-filter?config=.nycrc.json) 11 | ![Read the Docs](https://img.shields.io/readthedocs/j-parser) 12 | 13 | 14 | --- 15 | A variety of public facing social websites process input texts from users in order to display it in public. These websites usually:w 16 | utilize a profanity filtering service in order to avoid exposing the public from extremely obscene phrases. Unfortunately, most of the filtering packages only have support for a few languages. [Amharic](https://en.wikipedia.org/wiki/Amharic), the official language of Ethiopia with more than 20 million speakers worldwide, has not been one of the supported languages. At least not until [obscenity-filter](https://bruk3.github.io/obscenity-filter). 17 | 18 | 19 | ## Usage 20 | 21 | 22 | ### Check if an Amharic word is obscene or not 23 | ```js 24 | const OFilter = require('obscenity-filter'); 25 | const filter = new OFilter(true) 26 | 27 | console.log(filter.isPure('hello')); // true 28 | console.log(filter.isPure('ብድሬን')); // true 29 | console.log(filter.isPure('ብድ')); // false 30 | ``` 31 | 32 | ### Scrub all obscene words and replace them with asterisk characters. 33 | ```js 34 | const rawPhrase = 'አንዳንድ ሰዎች በማህበራዊ ገጽ ላይ እየገቡ ብዳታም እያሉ ይሳደባሉ'; 35 | const cleanedPhrase = 'አንዳንድ ሰዎች በማህበራዊ ገጽ ላይ እየገቡ **** እያሉ ይሳደባሉ'; 36 | 37 | filter.scrub(rawPhrase); // returns cleanedPhrase 38 | ``` 39 | 40 | ### Get the labels for an obscene word 41 | ```js 42 | 43 | filter.getLabels('ልብዳቹ'); // returns [PN, IN] [pornographic, insulting] 44 | ``` 45 | 46 | ### Add new words to the set of obscenity words 47 | 48 | ```js 49 | const newBadWords = ['ግማታም', 'ጥንባታም']; 50 | filter.addWords(newBadWords, [['IN'], ['IN']]); 51 | 52 | filter.addWords(['OTHER_BAD_WORD'], []) // Uses the label NO (NONE) as the default label. 53 | 54 | ``` 55 | 56 | ### Remove words from the set of obscenity words 57 | ```js 58 | filter.isPure('ቅምጥ') // false 59 | filter.removeWords(['ቅምጥ']); 60 | filter.isPure('ቅምጥ') // true 61 | ``` -------------------------------------------------------------------------------- /docs/scripts/search.js: -------------------------------------------------------------------------------- 1 | 2 | var searchAttr = 'data-search-mode'; 3 | function contains(a,m){ 4 | return (a.textContent || a.innerText || "").toUpperCase().indexOf(m) !== -1; 5 | }; 6 | 7 | //on search 8 | document.getElementById("nav-search").addEventListener("keyup", function(event) { 9 | var search = this.value.toUpperCase(); 10 | 11 | if (!search) { 12 | //no search, show all results 13 | document.documentElement.removeAttribute(searchAttr); 14 | 15 | document.querySelectorAll("nav > ul > li:not(.level-hide)").forEach(function(elem) { 16 | elem.style.display = "block"; 17 | }); 18 | 19 | if (typeof hideAllButCurrent === "function"){ 20 | //let's do what ever collapse wants to do 21 | hideAllButCurrent(); 22 | } else { 23 | //menu by default should be opened 24 | document.querySelectorAll("nav > ul > li > ul li").forEach(function(elem) { 25 | elem.style.display = "block"; 26 | }); 27 | } 28 | } else { 29 | //we are searching 30 | document.documentElement.setAttribute(searchAttr, ''); 31 | 32 | //show all parents 33 | document.querySelectorAll("nav > ul > li").forEach(function(elem) { 34 | elem.style.display = "block"; 35 | }); 36 | //hide all results 37 | document.querySelectorAll("nav > ul > li > ul li").forEach(function(elem) { 38 | elem.style.display = "none"; 39 | }); 40 | //show results matching filter 41 | document.querySelectorAll("nav > ul > li > ul a").forEach(function(elem) { 42 | if (!contains(elem.parentNode, search)) { 43 | return; 44 | } 45 | elem.parentNode.style.display = "block"; 46 | }); 47 | //hide parents without children 48 | document.querySelectorAll("nav > ul > li").forEach(function(parent) { 49 | var countSearchA = 0; 50 | parent.querySelectorAll("a").forEach(function(elem) { 51 | if (contains(elem, search)) { 52 | countSearchA++; 53 | } 54 | }); 55 | 56 | var countUl = 0; 57 | var countUlVisible = 0; 58 | parent.querySelectorAll("ul").forEach(function(ulP) { 59 | // count all elements that match the search 60 | if (contains(ulP, search)) { 61 | countUl++; 62 | } 63 | 64 | // count all visible elements 65 | var children = ulP.children 66 | for (i=0; i 2 | 3 | 4 | 5 | 6 | index.js - Documentation 7 | 8 | 9 | 10 | 11 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 25 | 26 | 27 | 28 | 32 | 33 |
34 | 35 |

index.js

36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 |
44 |
45 |
const badWords = require('../data/amharic.json').words;
 46 | 
 47 | /**
 48 |  * Checks if a word is obscene.
 49 |  * Returns true if the word is not obscene
 50 |  *
 51 |  * @param {string} word
 52 |  * @returns {boolean}
 53 |  */
 54 | function isPure(word) {
 55 |   return !(word in badWords);
 56 | }
 57 | 
 58 | /**
 59 |  * Returns the categorizing labels for a given obscene word.
 60 |  * Returns an empty array if isPure(word) == true.
 61 |  *
 62 |  * @param {string} word
 63 |  * @returns {array}
 64 |  */
 65 | function getLabels(word) {
 66 |   let labels = [];
 67 | 
 68 |   if (word in badWords) {
 69 |     labels = badWords[word];
 70 |   }
 71 |   return labels;
 72 | }
 73 | 
 74 | /**
 75 |  * Checks if a phrase/sentence contains any obscene word.
 76 |  * Splits the string by whitespace before checking each word for obscenity.
 77 |  *
 78 |  * @param {string} phrase
 79 |  * @return {boolean}
 80 | */
 81 | function containsObsceneWord(phrase) {
 82 |   const words = phrase.trim().split(/\s+/);
 83 | 
 84 |   for (let i = 0; i < words.length; i += 1) {
 85 |     if (!isPure(words[i])) {
 86 |       return true;
 87 |     }
 88 |   }
 89 | 
 90 |   return false;
 91 | }
 92 | 
 93 | /**
 94 |  * Scrubs all obscene words and replaces them with asterisk characters.
 95 |  *
 96 |  * @param {string} phrase
 97 |  * @return {string}
 98 |  */
 99 | 
100 | function rmObscenityFromString(phrase) {
101 |   const words = phrase.trim().split(/\s+/);
102 | 
103 |   const filtered = [];
104 |   for (let i = 0; i < words.length; i += 1) {
105 |     if (isPure(words[i])) {
106 |       filtered.push(words[i]);
107 |     } else {
108 |       filtered.push('*'.repeat(words[i].length));
109 |     }
110 |   }
111 | 
112 |   return filtered.join(' ');
113 | }
114 | /**
115 |  * Returns an array of all non-obscene words. Order of input is maintained.
116 |  *
117 |  * @param {array} words
118 |  * @return {array}
119 |  */
120 | 
121 | function rmObscenityFromArray(words) {
122 |   const filtered = [];
123 |   for (let i = 0; i < words.length; i += 1) {
124 |     if (isPure(words[i])) {
125 |       filtered.push(words[i]);
126 |     }
127 |   }
128 |   return filtered;
129 | }
130 | 
131 | function rmObscenity(words) {
132 |   if (typeof (words) === 'string') {
133 |     return rmObscenityFromString(words);
134 |   }
135 | 
136 |   if (Array.isArray(words)) {
137 |     return rmObscenityFromArray(words);
138 |   }
139 | 
140 |   throw new TypeError();
141 | }
142 | 
143 | module.exports = {
144 |   containsObsceneWord,
145 |   getLabels,
146 |   isPure,
147 |   rmObscenity,
148 | };
149 | 
150 |
151 |
152 | 153 | 154 | 155 | 156 | 157 | 158 |
159 | 160 |
161 | 162 | 165 | 166 | 167 | 168 | 169 | 170 | 171 | 172 | 173 | 174 | -------------------------------------------------------------------------------- /docs/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | Home - Documentation 7 | 8 | 9 | 10 | 11 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 25 | 26 | 27 | 28 | 32 | 33 |
34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 |
44 |

45 |
46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 |
60 |

obscenity-filter

61 |

What is it?

62 |

A javascript library that detects obscene Amharic words and phrases.

63 |

An obscenity filter library for the Amharic langauge.

64 |

GitHub 65 | GitHub Workflow Status (branch) 66 | nycrc config on GitHub 67 | Read the Docs

68 |
69 |

A variety of public facing social websites process input texts from users in order to display it in public. These websites usually:w 70 | utilize a profanity filtering service in order to avoid exposing the public from extremely obscene phrases. Unfortunately, most of the filtering packages only have support for a few languages. Amharic, the official language of Ethiopia with more than 20 million speakers worldwide, has not been one of the supported languages. At least not until obscenity-filter.

71 |

Usage

72 |

Check if an Amharic word is obscene or not

73 |
const OFilter = require('obscenity-filter');
 74 | const filter = new OFilter(true)
 75 | 
 76 | console.log(filter.isPure('hello')); // true 
 77 | console.log(filter.isPure('ብድሬን')); // true
 78 | console.log(filter.isPure('ብድ'));  // false
 79 | 
80 |

Scrub all obscene words and replace them with asterisk characters.

81 |
const rawPhrase = 'አንዳንድ ሰዎች በማህበራዊ ገጽ ላይ እየገቡ ብዳታም እያሉ ይሳደባሉ';
 82 | const cleanedPhrase = 'አንዳንድ ሰዎች በማህበራዊ ገጽ ላይ እየገቡ **** እያሉ ይሳደባሉ';
 83 | 
 84 | filter.scrub(rawPhrase); // returns cleanedPhrase
 85 | 
86 |

Get the labels for an obscene word

87 |

 88 | filter.getLabels('ልብዳቹ'); // returns [PN, IN] [pornographic, insulting]
 89 | 
90 |

Add new words to the set of obscenity words

91 |
const newBadWords = ['ግማታም', 'ጥንባታም'];
 92 | filter.addWords(newBadWords, [['IN'], ['IN']]);
 93 | 
 94 | filter.addWords(['OTHER_BAD_WORD'], []) // Uses the label NO (NONE) as the default label.
 95 | 
 96 | 
97 |

Remove words from the set of obscenity words

98 |
const wordsToRemove = ['ቅምጥ', 'ግማታም'];
 99 | filter.removeWords(toRemove);
100 |
101 | 102 | 103 | 104 | 105 | 106 | 107 | 108 | 109 |
110 | 111 |
112 | 113 | 116 | 117 | 118 | 119 | 120 | 121 | 122 | 123 | 124 | -------------------------------------------------------------------------------- /docs/filter.js.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | filter.js - Documentation 7 | 8 | 9 | 10 | 11 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 25 | 26 | 27 | 28 | 32 | 33 |
34 | 35 |

filter.js

36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 |
44 |
45 |
const obsceneWords = require('../data/amharic.json').words;
 46 | 
 47 | class Filter {
 48 |   /** Filter object constructor
 49 |    * @param {boolean} useDefaultWords - Use the default set of obscene words
 50 |    * @param {array} excludeWords - Words to exclude from obscenity set
 51 |    * @param {string} replaceBy - Character used to replace obscene words
 52 |   */
 53 |   constructor(useDefaultWords, excludeWords, replaceBy) {
 54 |     this.obscenitySet = {};
 55 |     if (useDefaultWords === undefined || useDefaultWords === true) {
 56 |       this.obscenitySet = obsceneWords;
 57 |     }
 58 | 
 59 |     this.replaceBy = replaceBy || '*';
 60 |     this.removeWords(excludeWords || []);
 61 |   }
 62 | 
 63 |   /** Add new words to obscenity set
 64 |    * @param {array} words  New words to add to obscenity set
 65 |    * @param {array} labels An array of arrays with all the labels for each new word
 66 |    */
 67 |   addWords(words, labels) {
 68 |     if (!words || !labels) {
 69 |       throw new Error('Empty argument exception: addWords requires two positional parameters');
 70 |     }
 71 |     for (let i = 0; i < words.length; i += 1) {
 72 |       this.addWord(words[i], labels[i] || null);
 73 |     }
 74 |   }
 75 | 
 76 |   /** Add single word to the set of obscenity words
 77 |    * @param {string} word
 78 |    * @param {array} labels Labels of the new word: Existing labels are [PN, RT, IN, NO]
 79 |    */
 80 | 
 81 |   addWord(word, labels) {
 82 |     if (!labels || labels.length === 0) {
 83 |       this.obscenitySet[word] = ['NO'];
 84 |     } else {
 85 |       this.obscenitySet[word] = labels;
 86 |     }
 87 |   }
 88 | 
 89 |   /**
 90 |    * Checks if a word is obscene.
 91 |    * Returns true if the word is not obscene
 92 |    *
 93 |    * @param {string} word
 94 |    * @returns {boolean}
 95 |    */
 96 |   isPure(word) {
 97 |     return !(word in this.obscenitySet);
 98 |   }
 99 | 
100 |   /** Remove words from the set of obscenity words
101 |    * @param {list} words A list of strings
102 |    *
103 |   */
104 |   removeWords(words) {
105 |     for (let i = 0; i < words.length; i += 1) {
106 |       this.removeWord(words[i]);
107 |     }
108 |   }
109 | 
110 |   /** Remove single word from the set of obscenity words
111 |    * @param {string} word
112 |    */
113 |   removeWord(word) {
114 |     delete this.obscenitySet[word];
115 |   }
116 | 
117 |   /**
118 |    * Returns the categorizing labels for a given obscene word.
119 |    * Returns an empty array if isPure(word) == true.
120 |    *
121 |    * @param {string} word
122 |    * @returns {array}
123 |    */
124 |   getLabels(word) {
125 |     let labels = [];
126 | 
127 |     if (word in this.obscenitySet) {
128 |       labels = this.obscenitySet[word];
129 |     }
130 |     return labels;
131 |   }
132 | 
133 |   /**
134 |    * Checks if a phrase/sentence contains any obscene word.
135 |    * Splits the string by whitespace before checking each word for obscenity.
136 |    *
137 |    * @param {string} phrase
138 |    * @return {boolean}
139 |   */
140 |   containsObscenity(phrase) {
141 |     const words = phrase.trim().split(/\s+/);
142 | 
143 |     for (let i = 0; i < words.length; i += 1) {
144 |       if (!this.isPure(words[i])) {
145 |         return true;
146 |       }
147 |     }
148 | 
149 |     return false;
150 |   }
151 | 
152 |   /**
153 |    * Scrubs all obscene words and replaces them with asterisk characters.
154 |    *
155 |    * @param {string} phrase
156 |    * @return {string}
157 |    */
158 | 
159 |   scrub(phrase) {
160 |     const words = phrase.trim().split(/\s+/);
161 | 
162 |     const filtered = [];
163 |     for (let i = 0; i < words.length; i += 1) {
164 |       if (this.isPure(words[i])) {
165 |         filtered.push(words[i]);
166 |       } else {
167 |         filtered.push(this.replaceBy.repeat(words[i].length));
168 |       }
169 |     }
170 | 
171 |     return filtered.join(' ');
172 |   }
173 | }
174 | 
175 | module.exports = Filter;
176 | 
177 |
178 |
179 | 180 | 181 | 182 | 183 | 184 | 185 |
186 | 187 |
188 | 189 | 192 | 193 | 194 | 195 | 196 | 197 | 198 | 199 | 200 | 201 | -------------------------------------------------------------------------------- /test/filter.js: -------------------------------------------------------------------------------- 1 | const { assert } = require('chai'); 2 | const { describe, it } = require('mocha'); 3 | 4 | const Filter = require('../src/filter'); 5 | 6 | const filter = new Filter(); 7 | 8 | const BAD_WORDS = [ 9 | 'ብድ', 10 | ]; 11 | 12 | const GOOD_WORDS = [ 13 | 'ብድሬን', 14 | ]; 15 | 16 | const GOOD_PHRASES = [ 17 | 'ልዑኩ ትናንት አዲስ አበባ የገባው በኢትዮጵያ መንግሥትና በትግራይ ክልል ኃይሎች መካከል እየተካሄደ ያለው ግጭት ሦስት ሳምንት ካስቆጠረ እና የመጨረሻ የተባለው ዘመቻ እንዲካሄድ ጠቅላይ ሚንሰትሩ ካዘዙ በኋላ ነው።', 18 | 'በዚህ መሰል የምርመራ ሥራ ላይ ተሳትፎ ሲደረግ በተቻለ መጠን ግላዊ ስሜትን ወደ ጎን በማድረግ ሙያዊ ሥራ ላይ ማተኮር ይጠበቃል', 19 | ]; 20 | 21 | const BAD_PHRASES = [ 22 | 'አንዳንድ ሰዎች በማህበራዊ ገጽ ላይ እየገቡ ብዳታም እያሉ ይሳደባሉ', 23 | ]; 24 | 25 | describe('filter', () => { 26 | describe('isPure', () => { 27 | it('should return type boolean for all words', () => { 28 | for (let i = 0; i < BAD_WORDS.length; i += 1) { 29 | const word = BAD_WORDS[i]; 30 | assert.typeOf(filter.isPure(word), 'boolean', `isPure(${word}) does not return a boolean`); 31 | } 32 | 33 | for (let i = 0; i < GOOD_WORDS.length; i += 1) { 34 | const word = GOOD_WORDS[i]; 35 | assert.typeOf(filter.isPure(word), 'boolean', `isPure(${word}) does not return a boolean`); 36 | } 37 | }); 38 | }); 39 | }); 40 | 41 | describe('filter', () => { 42 | describe('isPure', () => { 43 | it('should return false for any obscene amharic word in the json file', () => { 44 | for (let i = 0; i < BAD_WORDS.length; i += 1) { 45 | const word = BAD_WORDS[i]; 46 | assert.equal(filter.isPure(word), false); 47 | } 48 | }); 49 | }); 50 | }); 51 | 52 | describe('filter', () => { 53 | describe('isPure', () => { 54 | it('should return true for all "non-obscene" Amharic words', () => { 55 | for (let i = 0; i < GOOD_WORDS.length; i += 1) { 56 | const word = GOOD_WORDS[i]; 57 | assert.equal(filter.isPure(word), true); 58 | } 59 | }); 60 | }); 61 | }); 62 | 63 | describe('filter', () => { 64 | describe('isPure', () => { 65 | it('empty string should return false', () => { 66 | assert.equal(filter.isPure(''), true); 67 | }); 68 | }); 69 | }); 70 | 71 | describe('filter', () => { 72 | describe('getLabels', () => { 73 | it('should return an empty list for "non-obscene" Amharic words', () => { 74 | for (let i = 0; i < GOOD_WORDS.length; i += 1) { 75 | const word = GOOD_WORDS[i]; 76 | assert.deepEqual(filter.getLabels(word), []); 77 | } 78 | }); 79 | }); 80 | }); 81 | 82 | describe('filter', () => { 83 | describe('getLabels', () => { 84 | it('should return a list of the matching labels', () => { 85 | assert.deepEqual(filter.getLabels(BAD_WORDS[0]), ['PN']); 86 | }); 87 | }); 88 | }); 89 | 90 | describe('filter', () => { 91 | describe('containsObscenity', () => { 92 | it('should return true for sentences that contain obscenity', () => { 93 | for (let i = 0; i < BAD_PHRASES.length; i += 1) { 94 | const phrase = BAD_PHRASES[i]; 95 | assert.equal(filter.containsObscenity(phrase), true); 96 | } 97 | }); 98 | }); 99 | }); 100 | 101 | describe('filter', () => { 102 | describe('containsObscenity', () => { 103 | it('should return false for sentences with no obscene words in them', () => { 104 | for (let i = 0; i < GOOD_PHRASES.length; i += 1) { 105 | const phrase = GOOD_PHRASES[i]; 106 | assert.equal(filter.containsObscenity(phrase), false); 107 | } 108 | }); 109 | }); 110 | }); 111 | 112 | describe('filter', () => { 113 | describe('scrub', () => { 114 | it('should not remove anything except whitespaces for phrases with no obscenity', () => { 115 | for (let i = 0; i < GOOD_PHRASES.length; i += 1) { 116 | const phrase = GOOD_PHRASES[i]; 117 | const trimmedWords = phrase.trim().split(/\s+/); 118 | assert.equal(filter.scrub(phrase), trimmedWords.join(' ')); 119 | } 120 | }); 121 | }); 122 | }); 123 | 124 | describe('filter', () => { 125 | describe('scrub', () => { 126 | it('should remove all obscene words from string', () => { 127 | const rawPhrase = 'አንዳንድ ሰዎች በማህበራዊ ገጽ ላይ እየገቡ ብዳታም እያሉ ይሳደባሉ'; 128 | const cleanedPhrase = 'አንዳንድ ሰዎች በማህበራዊ ገጽ ላይ እየገቡ **** እያሉ ይሳደባሉ'; 129 | assert.equal(filter.scrub(rawPhrase), cleanedPhrase); 130 | }); 131 | }); 132 | }); 133 | 134 | describe('filter', () => { 135 | describe('scrub', () => { 136 | it('throws TypeError for arguments of neither string nor array', () => { 137 | assert.throws(() => filter.scrub({ key: 'value' }), TypeError); 138 | }); 139 | }); 140 | }); 141 | 142 | describe('filter', () => { 143 | describe('addWords', () => { 144 | it('throws TypeError when labels is undefined', () => { 145 | const newBadWords = ['አህያ', 'ድንጋይ']; 146 | assert.throws(() => filter.addWords(newBadWords), Error, 'Empty argument exception: addWords requires two positional parameters'); 147 | }); 148 | }); 149 | }); 150 | 151 | describe('filter', () => { 152 | describe('addWords', () => { 153 | it('adds new words with no filters to obscenity set. Check if the filter is NO', () => { 154 | const newBadWords = ['አህያ', 'ድንጋይ']; 155 | filter.addWords(newBadWords, []); 156 | for (let i = 0; i < newBadWords.length; i += 1) { 157 | assert.equal(filter.isPure(newBadWords[i]), false); 158 | assert.deepEqual(filter.getLabels(newBadWords[i]), ['NO']); 159 | } 160 | }); 161 | }); 162 | }); 163 | 164 | describe('filter', () => { 165 | describe('addWords', () => { 166 | it('adds new words with IN (Insulting) filters to obscenity set.', () => { 167 | const newBadWords = ['ግማታም', 'ጥንባታም']; 168 | filter.addWords(newBadWords, [['IN'], ['IN']]); 169 | for (let i = 0; i < newBadWords.length; i += 1) { 170 | assert.equal(filter.isPure(newBadWords[i]), false); 171 | assert.deepEqual(filter.getLabels(newBadWords[i]), ['IN']); 172 | } 173 | }); 174 | }); 175 | }); 176 | 177 | describe('filter', () => { 178 | describe('removeWords', () => { 179 | it('removes words from the set of obscenity words', () => { 180 | const toRemove = ['ቅምጥ']; 181 | for (let i = 0; i < toRemove.length; i += 1) { 182 | assert.equal(filter.isPure(toRemove[i]), false); 183 | filter.removeWords(toRemove); 184 | assert.equal(filter.isPure(toRemove[i]), true); 185 | } 186 | }); 187 | }); 188 | }); 189 | -------------------------------------------------------------------------------- /docs/scripts/prettify/Apache-License-2.0.txt: -------------------------------------------------------------------------------- 1 | 2 | Apache License 3 | Version 2.0, January 2004 4 | http://www.apache.org/licenses/ 5 | 6 | TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION 7 | 8 | 1. Definitions. 9 | 10 | "License" shall mean the terms and conditions for use, reproduction, 11 | and distribution as defined by Sections 1 through 9 of this document. 12 | 13 | "Licensor" shall mean the copyright owner or entity authorized by 14 | the copyright owner that is granting the License. 15 | 16 | "Legal Entity" shall mean the union of the acting entity and all 17 | other entities that control, are controlled by, or are under common 18 | control with that entity. For the purposes of this definition, 19 | "control" means (i) the power, direct or indirect, to cause the 20 | direction or management of such entity, whether by contract or 21 | otherwise, or (ii) ownership of fifty percent (50%) or more of the 22 | outstanding shares, or (iii) beneficial ownership of such entity. 23 | 24 | "You" (or "Your") shall mean an individual or Legal Entity 25 | exercising permissions granted by this License. 26 | 27 | "Source" form shall mean the preferred form for making modifications, 28 | including but not limited to software source code, documentation 29 | source, and configuration files. 30 | 31 | "Object" form shall mean any form resulting from mechanical 32 | transformation or translation of a Source form, including but 33 | not limited to compiled object code, generated documentation, 34 | and conversions to other media types. 35 | 36 | "Work" shall mean the work of authorship, whether in Source or 37 | Object form, made available under the License, as indicated by a 38 | copyright notice that is included in or attached to the work 39 | (an example is provided in the Appendix below). 40 | 41 | "Derivative Works" shall mean any work, whether in Source or Object 42 | form, that is based on (or derived from) the Work and for which the 43 | editorial revisions, annotations, elaborations, or other modifications 44 | represent, as a whole, an original work of authorship. For the purposes 45 | of this License, Derivative Works shall not include works that remain 46 | separable from, or merely link (or bind by name) to the interfaces of, 47 | the Work and Derivative Works thereof. 48 | 49 | "Contribution" shall mean any work of authorship, including 50 | the original version of the Work and any modifications or additions 51 | to that Work or Derivative Works thereof, that is intentionally 52 | submitted to Licensor for inclusion in the Work by the copyright owner 53 | or by an individual or Legal Entity authorized to submit on behalf of 54 | the copyright owner. For the purposes of this definition, "submitted" 55 | means any form of electronic, verbal, or written communication sent 56 | to the Licensor or its representatives, including but not limited to 57 | communication on electronic mailing lists, source code control systems, 58 | and issue tracking systems that are managed by, or on behalf of, the 59 | Licensor for the purpose of discussing and improving the Work, but 60 | excluding communication that is conspicuously marked or otherwise 61 | designated in writing by the copyright owner as "Not a Contribution." 62 | 63 | "Contributor" shall mean Licensor and any individual or Legal Entity 64 | on behalf of whom a Contribution has been received by Licensor and 65 | subsequently incorporated within the Work. 66 | 67 | 2. Grant of Copyright License. Subject to the terms and conditions of 68 | this License, each Contributor hereby grants to You a perpetual, 69 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable 70 | copyright license to reproduce, prepare Derivative Works of, 71 | publicly display, publicly perform, sublicense, and distribute the 72 | Work and such Derivative Works in Source or Object form. 73 | 74 | 3. Grant of Patent License. Subject to the terms and conditions of 75 | this License, each Contributor hereby grants to You a perpetual, 76 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable 77 | (except as stated in this section) patent license to make, have made, 78 | use, offer to sell, sell, import, and otherwise transfer the Work, 79 | where such license applies only to those patent claims licensable 80 | by such Contributor that are necessarily infringed by their 81 | Contribution(s) alone or by combination of their Contribution(s) 82 | with the Work to which such Contribution(s) was submitted. If You 83 | institute patent litigation against any entity (including a 84 | cross-claim or counterclaim in a lawsuit) alleging that the Work 85 | or a Contribution incorporated within the Work constitutes direct 86 | or contributory patent infringement, then any patent licenses 87 | granted to You under this License for that Work shall terminate 88 | as of the date such litigation is filed. 89 | 90 | 4. Redistribution. You may reproduce and distribute copies of the 91 | Work or Derivative Works thereof in any medium, with or without 92 | modifications, and in Source or Object form, provided that You 93 | meet the following conditions: 94 | 95 | (a) You must give any other recipients of the Work or 96 | Derivative Works a copy of this License; and 97 | 98 | (b) You must cause any modified files to carry prominent notices 99 | stating that You changed the files; and 100 | 101 | (c) You must retain, in the Source form of any Derivative Works 102 | that You distribute, all copyright, patent, trademark, and 103 | attribution notices from the Source form of the Work, 104 | excluding those notices that do not pertain to any part of 105 | the Derivative Works; and 106 | 107 | (d) If the Work includes a "NOTICE" text file as part of its 108 | distribution, then any Derivative Works that You distribute must 109 | include a readable copy of the attribution notices contained 110 | within such NOTICE file, excluding those notices that do not 111 | pertain to any part of the Derivative Works, in at least one 112 | of the following places: within a NOTICE text file distributed 113 | as part of the Derivative Works; within the Source form or 114 | documentation, if provided along with the Derivative Works; or, 115 | within a display generated by the Derivative Works, if and 116 | wherever such third-party notices normally appear. The contents 117 | of the NOTICE file are for informational purposes only and 118 | do not modify the License. You may add Your own attribution 119 | notices within Derivative Works that You distribute, alongside 120 | or as an addendum to the NOTICE text from the Work, provided 121 | that such additional attribution notices cannot be construed 122 | as modifying the License. 123 | 124 | You may add Your own copyright statement to Your modifications and 125 | may provide additional or different license terms and conditions 126 | for use, reproduction, or distribution of Your modifications, or 127 | for any such Derivative Works as a whole, provided Your use, 128 | reproduction, and distribution of the Work otherwise complies with 129 | the conditions stated in this License. 130 | 131 | 5. Submission of Contributions. Unless You explicitly state otherwise, 132 | any Contribution intentionally submitted for inclusion in the Work 133 | by You to the Licensor shall be under the terms and conditions of 134 | this License, without any additional terms or conditions. 135 | Notwithstanding the above, nothing herein shall supersede or modify 136 | the terms of any separate license agreement you may have executed 137 | with Licensor regarding such Contributions. 138 | 139 | 6. Trademarks. This License does not grant permission to use the trade 140 | names, trademarks, service marks, or product names of the Licensor, 141 | except as required for reasonable and customary use in describing the 142 | origin of the Work and reproducing the content of the NOTICE file. 143 | 144 | 7. Disclaimer of Warranty. Unless required by applicable law or 145 | agreed to in writing, Licensor provides the Work (and each 146 | Contributor provides its Contributions) on an "AS IS" BASIS, 147 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 148 | implied, including, without limitation, any warranties or conditions 149 | of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A 150 | PARTICULAR PURPOSE. You are solely responsible for determining the 151 | appropriateness of using or redistributing the Work and assume any 152 | risks associated with Your exercise of permissions under this License. 153 | 154 | 8. Limitation of Liability. In no event and under no legal theory, 155 | whether in tort (including negligence), contract, or otherwise, 156 | unless required by applicable law (such as deliberate and grossly 157 | negligent acts) or agreed to in writing, shall any Contributor be 158 | liable to You for damages, including any direct, indirect, special, 159 | incidental, or consequential damages of any character arising as a 160 | result of this License or out of the use or inability to use the 161 | Work (including but not limited to damages for loss of goodwill, 162 | work stoppage, computer failure or malfunction, or any and all 163 | other commercial damages or losses), even if such Contributor 164 | has been advised of the possibility of such damages. 165 | 166 | 9. Accepting Warranty or Additional Liability. While redistributing 167 | the Work or Derivative Works thereof, You may choose to offer, 168 | and charge a fee for, acceptance of support, warranty, indemnity, 169 | or other liability obligations and/or rights consistent with this 170 | License. However, in accepting such obligations, You may act only 171 | on Your own behalf and on Your sole responsibility, not on behalf 172 | of any other Contributor, and only if You agree to indemnify, 173 | defend, and hold each Contributor harmless for any liability 174 | incurred by, or claims asserted against, such Contributor by reason 175 | of your accepting any such warranty or additional liability. 176 | 177 | END OF TERMS AND CONDITIONS 178 | 179 | APPENDIX: How to apply the Apache License to your work. 180 | 181 | To apply the Apache License to your work, attach the following 182 | boilerplate notice, with the fields enclosed by brackets "[]" 183 | replaced with your own identifying information. (Don't include 184 | the brackets!) The text should be enclosed in the appropriate 185 | comment syntax for the file format. We also recommend that a 186 | file or class name and description of purpose be included on the 187 | same "printed page" as the copyright notice for easier 188 | identification within third-party archives. 189 | 190 | Copyright [yyyy] [name of copyright owner] 191 | 192 | Licensed under the Apache License, Version 2.0 (the "License"); 193 | you may not use this file except in compliance with the License. 194 | You may obtain a copy of the License at 195 | 196 | http://www.apache.org/licenses/LICENSE-2.0 197 | 198 | Unless required by applicable law or agreed to in writing, software 199 | distributed under the License is distributed on an "AS IS" BASIS, 200 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 201 | See the License for the specific language governing permissions and 202 | limitations under the License. 203 | -------------------------------------------------------------------------------- /docs/scripts/prettify/prettify.js: -------------------------------------------------------------------------------- 1 | var q=null;window.PR_SHOULD_USE_CONTINUATION=!0; 2 | (function(){function L(a){function m(a){var f=a.charCodeAt(0);if(f!==92)return f;var b=a.charAt(1);return(f=r[b])?f:"0"<=b&&b<="7"?parseInt(a.substring(1),8):b==="u"||b==="x"?parseInt(a.substring(2),16):a.charCodeAt(1)}function e(a){if(a<32)return(a<16?"\\x0":"\\x")+a.toString(16);a=String.fromCharCode(a);if(a==="\\"||a==="-"||a==="["||a==="]")a="\\"+a;return a}function h(a){for(var f=a.substring(1,a.length-1).match(/\\u[\dA-Fa-f]{4}|\\x[\dA-Fa-f]{2}|\\[0-3][0-7]{0,2}|\\[0-7]{1,2}|\\[\S\s]|[^\\]/g),a= 3 | [],b=[],o=f[0]==="^",c=o?1:0,i=f.length;c122||(d<65||j>90||b.push([Math.max(65,j)|32,Math.min(d,90)|32]),d<97||j>122||b.push([Math.max(97,j)&-33,Math.min(d,122)&-33]))}}b.sort(function(a,f){return a[0]-f[0]||f[1]-a[1]});f=[];j=[NaN,NaN];for(c=0;ci[0]&&(i[1]+1>i[0]&&b.push("-"),b.push(e(i[1])));b.push("]");return b.join("")}function y(a){for(var f=a.source.match(/\[(?:[^\\\]]|\\[\S\s])*]|\\u[\dA-Fa-f]{4}|\\x[\dA-Fa-f]{2}|\\\d+|\\[^\dux]|\(\?[!:=]|[()^]|[^()[\\^]+/g),b=f.length,d=[],c=0,i=0;c=2&&a==="["?f[c]=h(j):a!=="\\"&&(f[c]=j.replace(/[A-Za-z]/g,function(a){a=a.charCodeAt(0);return"["+String.fromCharCode(a&-33,a|32)+"]"}));return f.join("")}for(var t=0,s=!1,l=!1,p=0,d=a.length;p=5&&"lang-"===b.substring(0,5))&&!(o&&typeof o[1]==="string"))c=!1,b="src";c||(r[f]=b)}i=d;d+=f.length;if(c){c=o[1];var j=f.indexOf(c),k=j+c.length;o[2]&&(k=f.length-o[2].length,j=k-c.length);b=b.substring(5);B(l+i,f.substring(0,j),e,p);B(l+i+j,c,C(b,c),p);B(l+i+k,f.substring(k),e,p)}else p.push(l+i,b)}a.e=p}var h={},y;(function(){for(var e=a.concat(m), 9 | l=[],p={},d=0,g=e.length;d=0;)h[n.charAt(k)]=r;r=r[1];n=""+r;p.hasOwnProperty(n)||(l.push(r),p[n]=q)}l.push(/[\S\s]/);y=L(l)})();var t=m.length;return e}function u(a){var m=[],e=[];a.tripleQuotedStrings?m.push(["str",/^(?:'''(?:[^'\\]|\\[\S\s]|''?(?=[^']))*(?:'''|$)|"""(?:[^"\\]|\\[\S\s]|""?(?=[^"]))*(?:"""|$)|'(?:[^'\\]|\\[\S\s])*(?:'|$)|"(?:[^"\\]|\\[\S\s])*(?:"|$))/,q,"'\""]):a.multiLineStrings?m.push(["str",/^(?:'(?:[^'\\]|\\[\S\s])*(?:'|$)|"(?:[^"\\]|\\[\S\s])*(?:"|$)|`(?:[^\\`]|\\[\S\s])*(?:`|$))/, 10 | q,"'\"`"]):m.push(["str",/^(?:'(?:[^\n\r'\\]|\\.)*(?:'|$)|"(?:[^\n\r"\\]|\\.)*(?:"|$))/,q,"\"'"]);a.verbatimStrings&&e.push(["str",/^@"(?:[^"]|"")*(?:"|$)/,q]);var h=a.hashComments;h&&(a.cStyleComments?(h>1?m.push(["com",/^#(?:##(?:[^#]|#(?!##))*(?:###|$)|.*)/,q,"#"]):m.push(["com",/^#(?:(?:define|elif|else|endif|error|ifdef|include|ifndef|line|pragma|undef|warning)\b|[^\n\r]*)/,q,"#"]),e.push(["str",/^<(?:(?:(?:\.\.\/)*|\/?)(?:[\w-]+(?:\/[\w-]+)+)?[\w-]+\.h|[a-z]\w*)>/,q])):m.push(["com",/^#[^\n\r]*/, 11 | q,"#"]));a.cStyleComments&&(e.push(["com",/^\/\/[^\n\r]*/,q]),e.push(["com",/^\/\*[\S\s]*?(?:\*\/|$)/,q]));a.regexLiterals&&e.push(["lang-regex",/^(?:^^\.?|[!+-]|!=|!==|#|%|%=|&|&&|&&=|&=|\(|\*|\*=|\+=|,|-=|->|\/|\/=|:|::|;|<|<<|<<=|<=|=|==|===|>|>=|>>|>>=|>>>|>>>=|[?@[^]|\^=|\^\^|\^\^=|{|\||\|=|\|\||\|\|=|~|break|case|continue|delete|do|else|finally|instanceof|return|throw|try|typeof)\s*(\/(?=[^*/])(?:[^/[\\]|\\[\S\s]|\[(?:[^\\\]]|\\[\S\s])*(?:]|$))+\/)/]);(h=a.types)&&e.push(["typ",h]);a=(""+a.keywords).replace(/^ | $/g, 12 | "");a.length&&e.push(["kwd",RegExp("^(?:"+a.replace(/[\s,]+/g,"|")+")\\b"),q]);m.push(["pln",/^\s+/,q," \r\n\t\xa0"]);e.push(["lit",/^@[$_a-z][\w$@]*/i,q],["typ",/^(?:[@_]?[A-Z]+[a-z][\w$@]*|\w+_t\b)/,q],["pln",/^[$_a-z][\w$@]*/i,q],["lit",/^(?:0x[\da-f]+|(?:\d(?:_\d+)*\d*(?:\.\d*)?|\.\d\+)(?:e[+-]?\d+)?)[a-z]*/i,q,"0123456789"],["pln",/^\\[\S\s]?/,q],["pun",/^.[^\s\w"-$'./@\\`]*/,q]);return x(m,e)}function D(a,m){function e(a){switch(a.nodeType){case 1:if(k.test(a.className))break;if("BR"===a.nodeName)h(a), 13 | a.parentNode&&a.parentNode.removeChild(a);else for(a=a.firstChild;a;a=a.nextSibling)e(a);break;case 3:case 4:if(p){var b=a.nodeValue,d=b.match(t);if(d){var c=b.substring(0,d.index);a.nodeValue=c;(b=b.substring(d.index+d[0].length))&&a.parentNode.insertBefore(s.createTextNode(b),a.nextSibling);h(a);c||a.parentNode.removeChild(a)}}}}function h(a){function b(a,d){var e=d?a.cloneNode(!1):a,f=a.parentNode;if(f){var f=b(f,1),g=a.nextSibling;f.appendChild(e);for(var h=g;h;h=g)g=h.nextSibling,f.appendChild(h)}return e} 14 | for(;!a.nextSibling;)if(a=a.parentNode,!a)return;for(var a=b(a.nextSibling,0),e;(e=a.parentNode)&&e.nodeType===1;)a=e;d.push(a)}var k=/(?:^|\s)nocode(?:\s|$)/,t=/\r\n?|\n/,s=a.ownerDocument,l;a.currentStyle?l=a.currentStyle.whiteSpace:window.getComputedStyle&&(l=s.defaultView.getComputedStyle(a,q).getPropertyValue("white-space"));var p=l&&"pre"===l.substring(0,3);for(l=s.createElement("LI");a.firstChild;)l.appendChild(a.firstChild);for(var d=[l],g=0;g=0;){var h=m[e];A.hasOwnProperty(h)?window.console&&console.warn("cannot override language handler %s",h):A[h]=a}}function C(a,m){if(!a||!A.hasOwnProperty(a))a=/^\s*=o&&(h+=2);e>=c&&(a+=2)}}catch(w){"console"in window&&console.log(w&&w.stack?w.stack:w)}}var v=["break,continue,do,else,for,if,return,while"],w=[[v,"auto,case,char,const,default,double,enum,extern,float,goto,int,long,register,short,signed,sizeof,static,struct,switch,typedef,union,unsigned,void,volatile"], 18 | "catch,class,delete,false,import,new,operator,private,protected,public,this,throw,true,try,typeof"],F=[w,"alignof,align_union,asm,axiom,bool,concept,concept_map,const_cast,constexpr,decltype,dynamic_cast,explicit,export,friend,inline,late_check,mutable,namespace,nullptr,reinterpret_cast,static_assert,static_cast,template,typeid,typename,using,virtual,where"],G=[w,"abstract,boolean,byte,extends,final,finally,implements,import,instanceof,null,native,package,strictfp,super,synchronized,throws,transient"], 19 | H=[G,"as,base,by,checked,decimal,delegate,descending,dynamic,event,fixed,foreach,from,group,implicit,in,interface,internal,into,is,lock,object,out,override,orderby,params,partial,readonly,ref,sbyte,sealed,stackalloc,string,select,uint,ulong,unchecked,unsafe,ushort,var"],w=[w,"debugger,eval,export,function,get,null,set,undefined,var,with,Infinity,NaN"],I=[v,"and,as,assert,class,def,del,elif,except,exec,finally,from,global,import,in,is,lambda,nonlocal,not,or,pass,print,raise,try,with,yield,False,True,None"], 20 | J=[v,"alias,and,begin,case,class,def,defined,elsif,end,ensure,false,in,module,next,nil,not,or,redo,rescue,retry,self,super,then,true,undef,unless,until,when,yield,BEGIN,END"],v=[v,"case,done,elif,esac,eval,fi,function,in,local,set,then,until"],K=/^(DIR|FILE|vector|(de|priority_)?queue|list|stack|(const_)?iterator|(multi)?(set|map)|bitset|u?(int|float)\d*)/,N=/\S/,O=u({keywords:[F,H,w,"caller,delete,die,do,dump,elsif,eval,exit,foreach,for,goto,if,import,last,local,my,next,no,our,print,package,redo,require,sub,undef,unless,until,use,wantarray,while,BEGIN,END"+ 21 | I,J,v],hashComments:!0,cStyleComments:!0,multiLineStrings:!0,regexLiterals:!0}),A={};k(O,["default-code"]);k(x([],[["pln",/^[^]*(?:>|$)/],["com",/^<\!--[\S\s]*?(?:--\>|$)/],["lang-",/^<\?([\S\s]+?)(?:\?>|$)/],["lang-",/^<%([\S\s]+?)(?:%>|$)/],["pun",/^(?:<[%?]|[%?]>)/],["lang-",/^]*>([\S\s]+?)<\/xmp\b[^>]*>/i],["lang-js",/^]*>([\S\s]*?)(<\/script\b[^>]*>)/i],["lang-css",/^]*>([\S\s]*?)(<\/style\b[^>]*>)/i],["lang-in.tag",/^(<\/?[a-z][^<>]*>)/i]]), 22 | ["default-markup","htm","html","mxml","xhtml","xml","xsl"]);k(x([["pln",/^\s+/,q," \t\r\n"],["atv",/^(?:"[^"]*"?|'[^']*'?)/,q,"\"'"]],[["tag",/^^<\/?[a-z](?:[\w-.:]*\w)?|\/?>$/i],["atn",/^(?!style[\s=]|on)[a-z](?:[\w:-]*\w)?/i],["lang-uq.val",/^=\s*([^\s"'>]*(?:[^\s"'/>]|\/(?=\s)))/],["pun",/^[/<->]+/],["lang-js",/^on\w+\s*=\s*"([^"]+)"/i],["lang-js",/^on\w+\s*=\s*'([^']+)'/i],["lang-js",/^on\w+\s*=\s*([^\s"'>]+)/i],["lang-css",/^style\s*=\s*"([^"]+)"/i],["lang-css",/^style\s*=\s*'([^']+)'/i],["lang-css", 23 | /^style\s*=\s*([^\s"'>]+)/i]]),["in.tag"]);k(x([],[["atv",/^[\S\s]+/]]),["uq.val"]);k(u({keywords:F,hashComments:!0,cStyleComments:!0,types:K}),["c","cc","cpp","cxx","cyc","m"]);k(u({keywords:"null,true,false"}),["json"]);k(u({keywords:H,hashComments:!0,cStyleComments:!0,verbatimStrings:!0,types:K}),["cs"]);k(u({keywords:G,cStyleComments:!0}),["java"]);k(u({keywords:v,hashComments:!0,multiLineStrings:!0}),["bsh","csh","sh"]);k(u({keywords:I,hashComments:!0,multiLineStrings:!0,tripleQuotedStrings:!0}), 24 | ["cv","py"]);k(u({keywords:"caller,delete,die,do,dump,elsif,eval,exit,foreach,for,goto,if,import,last,local,my,next,no,our,print,package,redo,require,sub,undef,unless,until,use,wantarray,while,BEGIN,END",hashComments:!0,multiLineStrings:!0,regexLiterals:!0}),["perl","pl","pm"]);k(u({keywords:J,hashComments:!0,multiLineStrings:!0,regexLiterals:!0}),["rb"]);k(u({keywords:w,cStyleComments:!0,regexLiterals:!0}),["js"]);k(u({keywords:"all,and,by,catch,class,else,extends,false,finally,for,if,in,is,isnt,loop,new,no,not,null,of,off,on,or,return,super,then,true,try,unless,until,when,while,yes", 25 | hashComments:3,cStyleComments:!0,multilineStrings:!0,tripleQuotedStrings:!0,regexLiterals:!0}),["coffee"]);k(x([],[["str",/^[\S\s]+/]]),["regex"]);window.prettyPrintOne=function(a,m,e){var h=document.createElement("PRE");h.innerHTML=a;e&&D(h,e);E({g:m,i:e,h:h});return h.innerHTML};window.prettyPrint=function(a){function m(){for(var e=window.PR_SHOULD_USE_CONTINUATION?l.now()+250:Infinity;p=0){var k=k.match(g),f,b;if(b= 26 | !k){b=n;for(var o=void 0,c=b.firstChild;c;c=c.nextSibling)var i=c.nodeType,o=i===1?o?b:c:i===3?N.test(c.nodeValue)?b:o:o;b=(f=o===b?void 0:o)&&"CODE"===f.tagName}b&&(k=f.className.match(g));k&&(k=k[1]);b=!1;for(o=n.parentNode;o;o=o.parentNode)if((o.tagName==="pre"||o.tagName==="code"||o.tagName==="xmp")&&o.className&&o.className.indexOf("prettyprint")>=0){b=!0;break}b||((b=(b=n.className.match(/\blinenums\b(?::(\d+))?/))?b[1]&&b[1].length?+b[1]:!0:!1)&&D(n,b),d={g:k,h:n,i:b},E(d))}}p 2 | 3 | 4 | 5 | 6 | Global - Documentation 7 | 8 | 9 | 10 | 11 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 25 | 26 | 27 | 28 | 32 | 33 |
34 | 35 |

Global

36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 |
44 | 45 |
46 | 47 |

48 | 49 |

50 | 51 | 52 |
53 | 54 |
55 | 56 |
57 | 58 | 59 | 60 |
61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 |
94 | 95 | 96 | 97 | 98 | 99 | 100 | 101 | 102 |
103 | 104 | 105 | 106 | 107 | 108 | 109 | 110 | 111 | 112 | 113 | 114 | 115 | 116 | 117 | 118 | 119 | 120 |

Methods

121 | 122 | 123 | 124 | 125 | 126 | 127 |

containsObsceneWord(phrase) → {boolean}

128 | 129 | 130 | 131 | 132 | 133 | 134 |
135 | 136 | 137 |
Source:
138 |
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 | 167 | 168 | 169 | 170 | 171 | 172 |
173 | 174 | 175 | 176 | 177 | 178 |
179 |

Checks if a phrase/sentence contains any obscene word. 180 | Splits the string by whitespace before checking each word for obscenity.

181 |
182 | 183 | 184 | 185 | 186 | 187 | 188 | 189 | 190 | 191 | 192 | 193 |
Parameters:
194 | 195 | 196 | 197 | 198 | 199 | 200 | 201 | 202 | 203 | 204 | 205 | 206 | 207 | 208 | 209 | 210 | 211 | 212 | 213 | 214 | 215 | 216 | 217 | 218 | 219 | 220 | 221 | 229 | 230 | 231 | 232 | 233 | 234 | 235 | 236 | 237 | 238 | 239 |
NameTypeDescription
phrase 222 | 223 | 224 | string 225 | 226 | 227 | 228 |
240 | 241 | 242 | 243 | 244 | 245 | 246 | 247 | 248 | 249 | 250 | 251 | 252 | 253 | 254 | 255 | 256 |
Returns:
257 | 258 | 259 | 260 | 261 |
262 |
263 | Type 264 |
265 |
266 | 267 | boolean 268 | 269 | 270 |
271 |
272 | 273 | 274 | 275 | 276 | 277 | 278 | 279 | 280 | 281 | 282 |

getLabels(word) → {array}

283 | 284 | 285 | 286 | 287 | 288 | 289 |
290 | 291 | 292 |
Source:
293 |
296 | 297 | 298 | 299 | 300 | 301 | 302 | 303 | 304 | 305 | 306 | 307 | 308 | 309 | 310 | 311 | 312 | 313 | 314 | 315 | 316 | 317 | 318 | 319 | 320 | 321 | 322 | 323 | 324 | 325 | 326 | 327 |
328 | 329 | 330 | 331 | 332 | 333 |
334 |

Returns the categorizing labels for a given obscene word. 335 | Returns an empty array if isPure(word) == true.

336 |
337 | 338 | 339 | 340 | 341 | 342 | 343 | 344 | 345 | 346 | 347 | 348 |
Parameters:
349 | 350 | 351 | 352 | 353 | 354 | 355 | 356 | 357 | 358 | 359 | 360 | 361 | 362 | 363 | 364 | 365 | 366 | 367 | 368 | 369 | 370 | 371 | 372 | 373 | 374 | 375 | 376 | 384 | 385 | 386 | 387 | 388 | 389 | 390 | 391 | 392 | 393 | 394 |
NameTypeDescription
word 377 | 378 | 379 | string 380 | 381 | 382 | 383 |
395 | 396 | 397 | 398 | 399 | 400 | 401 | 402 | 403 | 404 | 405 | 406 | 407 | 408 | 409 | 410 | 411 |
Returns:
412 | 413 | 414 | 415 | 416 |
417 |
418 | Type 419 |
420 |
421 | 422 | array 423 | 424 | 425 |
426 |
427 | 428 | 429 | 430 | 431 | 432 | 433 | 434 | 435 | 436 | 437 |

isPure(word) → {boolean}

438 | 439 | 440 | 441 | 442 | 443 | 444 |
445 | 446 | 447 |
Source:
448 |
451 | 452 | 453 | 454 | 455 | 456 | 457 | 458 | 459 | 460 | 461 | 462 | 463 | 464 | 465 | 466 | 467 | 468 | 469 | 470 | 471 | 472 | 473 | 474 | 475 | 476 | 477 | 478 | 479 | 480 | 481 | 482 |
483 | 484 | 485 | 486 | 487 | 488 |
489 |

Checks if a word is obscene. 490 | Returns true if the word is not obscene

491 |
492 | 493 | 494 | 495 | 496 | 497 | 498 | 499 | 500 | 501 | 502 | 503 |
Parameters:
504 | 505 | 506 | 507 | 508 | 509 | 510 | 511 | 512 | 513 | 514 | 515 | 516 | 517 | 518 | 519 | 520 | 521 | 522 | 523 | 524 | 525 | 526 | 527 | 528 | 529 | 530 | 531 | 539 | 540 | 541 | 542 | 543 | 544 | 545 | 546 | 547 | 548 | 549 |
NameTypeDescription
word 532 | 533 | 534 | string 535 | 536 | 537 | 538 |
550 | 551 | 552 | 553 | 554 | 555 | 556 | 557 | 558 | 559 | 560 | 561 | 562 | 563 | 564 | 565 | 566 |
Returns:
567 | 568 | 569 | 570 | 571 |
572 |
573 | Type 574 |
575 |
576 | 577 | boolean 578 | 579 | 580 |
581 |
582 | 583 | 584 | 585 | 586 | 587 | 588 | 589 | 590 | 591 | 592 |

rmObscenityFromArray(words) → {array}

593 | 594 | 595 | 596 | 597 | 598 | 599 |
600 | 601 | 602 |
Source:
603 |
606 | 607 | 608 | 609 | 610 | 611 | 612 | 613 | 614 | 615 | 616 | 617 | 618 | 619 | 620 | 621 | 622 | 623 | 624 | 625 | 626 | 627 | 628 | 629 | 630 | 631 | 632 | 633 | 634 | 635 | 636 | 637 |
638 | 639 | 640 | 641 | 642 | 643 |
644 |

Returns an array of all non-obscene words. Order of input is maintained.

645 |
646 | 647 | 648 | 649 | 650 | 651 | 652 | 653 | 654 | 655 | 656 | 657 |
Parameters:
658 | 659 | 660 | 661 | 662 | 663 | 664 | 665 | 666 | 667 | 668 | 669 | 670 | 671 | 672 | 673 | 674 | 675 | 676 | 677 | 678 | 679 | 680 | 681 | 682 | 683 | 684 | 685 | 693 | 694 | 695 | 696 | 697 | 698 | 699 | 700 | 701 | 702 | 703 |
NameTypeDescription
words 686 | 687 | 688 | array 689 | 690 | 691 | 692 |
704 | 705 | 706 | 707 | 708 | 709 | 710 | 711 | 712 | 713 | 714 | 715 | 716 | 717 | 718 | 719 | 720 |
Returns:
721 | 722 | 723 | 724 | 725 |
726 |
727 | Type 728 |
729 |
730 | 731 | array 732 | 733 | 734 |
735 |
736 | 737 | 738 | 739 | 740 | 741 | 742 | 743 | 744 | 745 | 746 |

rmObscenityFromString(phrase) → {string}

747 | 748 | 749 | 750 | 751 | 752 | 753 |
754 | 755 | 756 |
Source:
757 |
760 | 761 | 762 | 763 | 764 | 765 | 766 | 767 | 768 | 769 | 770 | 771 | 772 | 773 | 774 | 775 | 776 | 777 | 778 | 779 | 780 | 781 | 782 | 783 | 784 | 785 | 786 | 787 | 788 | 789 | 790 | 791 |
792 | 793 | 794 | 795 | 796 | 797 |
798 |

Scrubs all obscene words and replaces them with asterisk characters.

799 |
800 | 801 | 802 | 803 | 804 | 805 | 806 | 807 | 808 | 809 | 810 | 811 |
Parameters:
812 | 813 | 814 | 815 | 816 | 817 | 818 | 819 | 820 | 821 | 822 | 823 | 824 | 825 | 826 | 827 | 828 | 829 | 830 | 831 | 832 | 833 | 834 | 835 | 836 | 837 | 838 | 839 | 847 | 848 | 849 | 850 | 851 | 852 | 853 | 854 | 855 | 856 | 857 |
NameTypeDescription
phrase 840 | 841 | 842 | string 843 | 844 | 845 | 846 |
858 | 859 | 860 | 861 | 862 | 863 | 864 | 865 | 866 | 867 | 868 | 869 | 870 | 871 | 872 | 873 | 874 |
Returns:
875 | 876 | 877 | 878 | 879 |
880 |
881 | Type 882 |
883 |
884 | 885 | string 886 | 887 | 888 |
889 |
890 | 891 | 892 | 893 | 894 | 895 | 896 | 897 | 898 | 899 | 900 | 901 |
902 | 903 |
904 | 905 | 906 | 907 | 908 | 909 | 910 |
911 | 912 |
913 | 914 |
915 | Documentation generated by JSDoc 3.6.6 on Thu Dec 10 2020 23:47:51 GMT-0500 (Eastern Standard Time) using the docdash theme. 916 |
917 | 918 | 919 | 920 | 921 | 922 | 923 | 924 | 925 | -------------------------------------------------------------------------------- /docs/styles/jsdoc.css: -------------------------------------------------------------------------------- 1 | * { 2 | box-sizing: border-box 3 | } 4 | 5 | html, body { 6 | height: 100%; 7 | width: 100%; 8 | } 9 | 10 | body { 11 | color: #4d4e53; 12 | background-color: white; 13 | margin: 0 auto; 14 | padding: 0 20px; 15 | font-family: 'Helvetica Neue', Helvetica, sans-serif; 16 | font-size: 16px; 17 | } 18 | 19 | img { 20 | max-width: 100%; 21 | } 22 | 23 | a, 24 | a:active { 25 | color: #606; 26 | text-decoration: none; 27 | } 28 | 29 | a:hover { 30 | text-decoration: none; 31 | } 32 | 33 | article a { 34 | border-bottom: 1px solid #ddd; 35 | } 36 | 37 | article a:hover, article a:active { 38 | border-bottom-color: #222; 39 | } 40 | 41 | article .description a { 42 | word-break: break-word; 43 | } 44 | 45 | p, ul, ol, blockquote { 46 | margin-bottom: 1em; 47 | line-height: 160%; 48 | } 49 | 50 | h1, h2, h3, h4, h5, h6 { 51 | font-family: 'Montserrat', sans-serif; 52 | } 53 | 54 | h1, h2, h3, h4, h5, h6 { 55 | color: #000; 56 | font-weight: 400; 57 | margin: 0; 58 | } 59 | 60 | h1 { 61 | font-weight: 300; 62 | font-size: 48px; 63 | margin: 1em 0 .5em; 64 | } 65 | 66 | h1.page-title { 67 | font-size: 48px; 68 | margin: 1em 30px; 69 | line-height: 100%; 70 | word-wrap: break-word; 71 | } 72 | 73 | h2 { 74 | font-size: 24px; 75 | margin: 1.5em 0 .3em; 76 | } 77 | 78 | h3 { 79 | font-size: 24px; 80 | margin: 1.2em 0 .3em; 81 | } 82 | 83 | h4 { 84 | font-size: 18px; 85 | margin: 1em 0 .2em; 86 | color: #4d4e53; 87 | } 88 | 89 | h4.name { 90 | color: #fff; 91 | background: #6d426d; 92 | box-shadow: 0 .25em .5em #d3d3d3; 93 | border-top: 1px solid #d3d3d3; 94 | border-bottom: 1px solid #d3d3d3; 95 | margin: 1.5em 0 0.5em; 96 | padding: .75em 0 .75em 10px; 97 | } 98 | 99 | h4.name a { 100 | color: #fc83ff; 101 | } 102 | 103 | h4.name a:hover { 104 | border-bottom-color: #fc83ff; 105 | } 106 | 107 | h5, .container-overview .subsection-title { 108 | font-size: 120%; 109 | letter-spacing: -0.01em; 110 | margin: 8px 0 3px 0; 111 | } 112 | 113 | h6 { 114 | font-size: 100%; 115 | letter-spacing: -0.01em; 116 | margin: 6px 0 3px 0; 117 | font-style: italic; 118 | } 119 | 120 | .usertext h1 { 121 | font-family: "Source Sans Pro"; 122 | font-size: 24px; 123 | margin: 2.5em 0 1em; 124 | font-weight: 400; 125 | } 126 | 127 | .usertext h2 { 128 | font-family: "Source Sans Pro"; 129 | font-size: 18px; 130 | margin: 2em 0 0.5em; 131 | font-weight: 400; 132 | 133 | } 134 | 135 | .usertext h3 { 136 | font-family: "Source Sans Pro"; 137 | font-size: 15px; 138 | margin: 1.5em 0 0; 139 | font-weight: 400; 140 | } 141 | 142 | .usertext h4 { 143 | font-family: "Source Sans Pro"; 144 | font-size: 14px; 145 | margin: 0 0 0; 146 | font-weight: 400; 147 | } 148 | 149 | .usertext h5 { 150 | font-size: 12px; 151 | margin: 1em 0 0; 152 | font-weight: normal; 153 | color: #666; 154 | } 155 | 156 | .usertext h6 { 157 | font-size: 11px; 158 | margin: 1em 0 0; 159 | font-weight: normal; 160 | font-style: normal; 161 | color: #666; 162 | } 163 | 164 | 165 | tt, code, kbd, samp { 166 | font-family: Consolas, Monaco, 'Andale Mono', monospace; 167 | background: #f4f4f4; 168 | padding: 1px 5px; 169 | } 170 | 171 | .class-description { 172 | font-size: 130%; 173 | line-height: 140%; 174 | margin-bottom: 1em; 175 | margin-top: 1em; 176 | } 177 | 178 | .class-description:empty { 179 | margin: 0 180 | } 181 | 182 | #main { 183 | float: right; 184 | width: calc(100% - 240px); 185 | } 186 | 187 | header { 188 | display: block 189 | } 190 | 191 | section { 192 | display: block; 193 | background-color: #fff; 194 | padding: 0 0 0 30px; 195 | } 196 | 197 | .variation { 198 | display: none 199 | } 200 | 201 | .signature-attributes { 202 | font-size: 60%; 203 | color: #eee; 204 | font-style: italic; 205 | font-weight: lighter; 206 | } 207 | 208 | nav { 209 | float: left; 210 | display: block; 211 | width: 250px; 212 | background: #fff; 213 | overflow: auto; 214 | position: fixed; 215 | height: 100%; 216 | } 217 | 218 | nav #nav-search{ 219 | width: 210px; 220 | height: 30px; 221 | padding: 5px 10px; 222 | font-size: 12px; 223 | line-height: 1.5; 224 | border-radius: 3px; 225 | margin-right: 20px; 226 | margin-top: 20px; 227 | } 228 | 229 | nav.wrap a{ 230 | word-wrap: break-word; 231 | } 232 | 233 | nav h3 { 234 | margin-top: 12px; 235 | font-size: 13px; 236 | text-transform: uppercase; 237 | letter-spacing: 1px; 238 | font-weight: 700; 239 | line-height: 24px; 240 | margin: 15px 0 10px; 241 | padding: 0; 242 | color: #000; 243 | } 244 | 245 | nav ul { 246 | font-family: 'Lucida Grande', 'Lucida Sans Unicode', arial, sans-serif; 247 | font-size: 100%; 248 | line-height: 17px; 249 | padding: 0; 250 | margin: 0; 251 | list-style-type: none; 252 | } 253 | 254 | nav ul a, 255 | nav ul a:active { 256 | font-family: 'Montserrat', sans-serif; 257 | line-height: 18px; 258 | padding: 0; 259 | display: block; 260 | font-size: 12px; 261 | } 262 | 263 | nav a:hover, 264 | nav a:active { 265 | color: #606; 266 | } 267 | 268 | nav > ul { 269 | padding: 0 10px; 270 | } 271 | 272 | nav > ul > li > a { 273 | color: #606; 274 | margin-top: 10px; 275 | } 276 | 277 | nav ul ul a { 278 | color: hsl(207, 1%, 60%); 279 | border-left: 1px solid hsl(207, 10%, 86%); 280 | } 281 | 282 | nav ul ul a, 283 | nav ul ul a:active { 284 | padding-left: 20px 285 | } 286 | 287 | nav h2 { 288 | font-size: 13px; 289 | margin: 10px 0 0 0; 290 | padding: 0; 291 | } 292 | 293 | nav > h2 > a { 294 | margin: 10px 0 -10px; 295 | color: #606 !important; 296 | } 297 | 298 | footer { 299 | color: hsl(0, 0%, 28%); 300 | margin-left: 250px; 301 | display: block; 302 | padding: 15px; 303 | font-style: italic; 304 | font-size: 90%; 305 | } 306 | 307 | .ancestors { 308 | color: #999 309 | } 310 | 311 | .ancestors a { 312 | color: #999 !important; 313 | } 314 | 315 | .clear { 316 | clear: both 317 | } 318 | 319 | .important { 320 | font-weight: bold; 321 | color: #950B02; 322 | } 323 | 324 | .yes-def { 325 | text-indent: -1000px 326 | } 327 | 328 | .type-signature { 329 | color: #CA79CA 330 | } 331 | 332 | .type-signature:last-child { 333 | color: #eee; 334 | } 335 | 336 | .name, .signature { 337 | font-family: Consolas, Monaco, 'Andale Mono', monospace 338 | } 339 | 340 | .signature { 341 | color: #fc83ff; 342 | } 343 | 344 | .details { 345 | margin-top: 6px; 346 | border-left: 2px solid #DDD; 347 | line-height: 20px; 348 | font-size: 14px; 349 | } 350 | 351 | .details dt { 352 | width: auto; 353 | float: left; 354 | padding-left: 10px; 355 | } 356 | 357 | .details dd { 358 | margin-left: 70px; 359 | margin-top: 6px; 360 | margin-bottom: 6px; 361 | } 362 | 363 | .details ul { 364 | margin: 0 365 | } 366 | 367 | .details ul { 368 | list-style-type: none 369 | } 370 | 371 | .details pre.prettyprint { 372 | margin: 0 373 | } 374 | 375 | .details .object-value { 376 | padding-top: 0 377 | } 378 | 379 | .description { 380 | margin-bottom: 1em; 381 | margin-top: 1em; 382 | } 383 | 384 | .code-caption { 385 | font-style: italic; 386 | font-size: 107%; 387 | margin: 0; 388 | } 389 | 390 | .prettyprint { 391 | font-size: 14px; 392 | overflow: auto; 393 | } 394 | 395 | .prettyprint.source { 396 | width: inherit; 397 | line-height: 18px; 398 | display: block; 399 | background-color: #0d152a; 400 | color: #aeaeae; 401 | } 402 | 403 | .prettyprint code { 404 | line-height: 18px; 405 | display: block; 406 | background-color: #0d152a; 407 | color: #4D4E53; 408 | } 409 | 410 | .prettyprint > code { 411 | padding: 15px; 412 | } 413 | 414 | .prettyprint .linenums code { 415 | padding: 0 15px 416 | } 417 | 418 | .prettyprint .linenums li:first-of-type code { 419 | padding-top: 15px 420 | } 421 | 422 | .prettyprint code span.line { 423 | display: inline-block 424 | } 425 | 426 | .prettyprint.linenums { 427 | padding-left: 70px; 428 | -webkit-user-select: none; 429 | -moz-user-select: none; 430 | -ms-user-select: none; 431 | user-select: none; 432 | } 433 | 434 | .prettyprint.linenums ol { 435 | padding-left: 0 436 | } 437 | 438 | .prettyprint.linenums li { 439 | border-left: 3px #34446B solid; 440 | } 441 | 442 | .prettyprint.linenums li.selected, .prettyprint.linenums li.selected * { 443 | background-color: #34446B; 444 | } 445 | 446 | .prettyprint.linenums li * { 447 | -webkit-user-select: text; 448 | -moz-user-select: text; 449 | -ms-user-select: text; 450 | user-select: text; 451 | } 452 | 453 | .prettyprint.linenums li code:empty:after { 454 | content:""; 455 | display:inline-block; 456 | width:0px; 457 | } 458 | 459 | table { 460 | border-spacing: 0; 461 | border: 1px solid #ddd; 462 | border-collapse: collapse; 463 | border-radius: 3px; 464 | box-shadow: 0 1px 3px rgba(0,0,0,0.1); 465 | width: 100%; 466 | font-size: 14px; 467 | margin: 1em 0; 468 | } 469 | 470 | td, th { 471 | margin: 0px; 472 | text-align: left; 473 | vertical-align: top; 474 | padding: 10px; 475 | display: table-cell; 476 | } 477 | 478 | thead tr, thead tr { 479 | background-color: #fff; 480 | font-weight: bold; 481 | border-bottom: 1px solid #ddd; 482 | } 483 | 484 | .params .type { 485 | white-space: nowrap; 486 | } 487 | 488 | .params code { 489 | white-space: pre; 490 | } 491 | 492 | .params td, .params .name, .props .name, .name code { 493 | color: #4D4E53; 494 | font-family: Consolas, Monaco, 'Andale Mono', monospace; 495 | font-size: 100%; 496 | } 497 | 498 | .params td { 499 | border-top: 1px solid #eee 500 | } 501 | 502 | .params td.description > p:first-child, .props td.description > p:first-child { 503 | margin-top: 0; 504 | padding-top: 0; 505 | } 506 | 507 | .params td.description > p:last-child, .props td.description > p:last-child { 508 | margin-bottom: 0; 509 | padding-bottom: 0; 510 | } 511 | 512 | span.param-type, .params td .param-type, .param-type dd { 513 | color: #606; 514 | font-family: Consolas, Monaco, 'Andale Mono', monospace 515 | } 516 | 517 | .param-type dt, .param-type dd { 518 | display: inline-block 519 | } 520 | 521 | .param-type { 522 | margin: 14px 0; 523 | } 524 | 525 | .disabled { 526 | color: #454545 527 | } 528 | 529 | /* navicon button */ 530 | .navicon-button { 531 | display: none; 532 | position: relative; 533 | padding: 2.0625rem 1.5rem; 534 | transition: 0.25s; 535 | cursor: pointer; 536 | -webkit-user-select: none; 537 | -moz-user-select: none; 538 | -ms-user-select: none; 539 | user-select: none; 540 | opacity: .8; 541 | } 542 | .navicon-button .navicon:before, .navicon-button .navicon:after { 543 | transition: 0.25s; 544 | } 545 | .navicon-button:hover { 546 | transition: 0.5s; 547 | opacity: 1; 548 | } 549 | .navicon-button:hover .navicon:before, .navicon-button:hover .navicon:after { 550 | transition: 0.25s; 551 | } 552 | .navicon-button:hover .navicon:before { 553 | top: .825rem; 554 | } 555 | .navicon-button:hover .navicon:after { 556 | top: -.825rem; 557 | } 558 | 559 | /* navicon */ 560 | .navicon { 561 | position: relative; 562 | width: 2.5em; 563 | height: .3125rem; 564 | background: #000; 565 | transition: 0.3s; 566 | border-radius: 2.5rem; 567 | } 568 | .navicon:before, .navicon:after { 569 | display: block; 570 | content: ""; 571 | height: .3125rem; 572 | width: 2.5rem; 573 | background: #000; 574 | position: absolute; 575 | z-index: -1; 576 | transition: 0.3s 0.25s; 577 | border-radius: 1rem; 578 | } 579 | .navicon:before { 580 | top: .625rem; 581 | } 582 | .navicon:after { 583 | top: -.625rem; 584 | } 585 | 586 | /* open */ 587 | .nav-trigger:checked + label:not(.steps) .navicon:before, 588 | .nav-trigger:checked + label:not(.steps) .navicon:after { 589 | top: 0 !important; 590 | } 591 | 592 | .nav-trigger:checked + label .navicon:before, 593 | .nav-trigger:checked + label .navicon:after { 594 | transition: 0.5s; 595 | } 596 | 597 | /* Minus */ 598 | .nav-trigger:checked + label { 599 | -webkit-transform: scale(0.75); 600 | transform: scale(0.75); 601 | } 602 | 603 | /* × and + */ 604 | .nav-trigger:checked + label.plus .navicon, 605 | .nav-trigger:checked + label.x .navicon { 606 | background: transparent; 607 | } 608 | 609 | .nav-trigger:checked + label.plus .navicon:before, 610 | .nav-trigger:checked + label.x .navicon:before { 611 | -webkit-transform: rotate(-45deg); 612 | transform: rotate(-45deg); 613 | background: #FFF; 614 | } 615 | 616 | .nav-trigger:checked + label.plus .navicon:after, 617 | .nav-trigger:checked + label.x .navicon:after { 618 | -webkit-transform: rotate(45deg); 619 | transform: rotate(45deg); 620 | background: #FFF; 621 | } 622 | 623 | .nav-trigger:checked + label.plus { 624 | -webkit-transform: scale(0.75) rotate(45deg); 625 | transform: scale(0.75) rotate(45deg); 626 | } 627 | 628 | .nav-trigger:checked ~ nav { 629 | left: 0 !important; 630 | } 631 | 632 | .nav-trigger:checked ~ .overlay { 633 | display: block; 634 | } 635 | 636 | .nav-trigger { 637 | position: fixed; 638 | top: 0; 639 | clip: rect(0, 0, 0, 0); 640 | } 641 | 642 | .overlay { 643 | display: none; 644 | position: fixed; 645 | top: 0; 646 | bottom: 0; 647 | left: 0; 648 | right: 0; 649 | width: 100%; 650 | height: 100%; 651 | background: hsla(0, 0%, 0%, 0.5); 652 | z-index: 1; 653 | } 654 | 655 | /* nav level */ 656 | .level-hide { 657 | display: none; 658 | } 659 | html[data-search-mode] .level-hide { 660 | display: block; 661 | } 662 | 663 | 664 | @media only screen and (max-width: 680px) { 665 | body { 666 | overflow-x: hidden; 667 | } 668 | 669 | nav { 670 | background: #FFF; 671 | width: 250px; 672 | height: 100%; 673 | position: fixed; 674 | top: 0; 675 | right: 0; 676 | bottom: 0; 677 | left: -250px; 678 | z-index: 3; 679 | padding: 0 10px; 680 | transition: left 0.2s; 681 | } 682 | 683 | .navicon-button { 684 | display: inline-block; 685 | position: fixed; 686 | top: 1.5em; 687 | right: 0; 688 | z-index: 2; 689 | } 690 | 691 | #main { 692 | width: 100%; 693 | } 694 | 695 | #main h1.page-title { 696 | margin: 1em 0; 697 | } 698 | 699 | #main section { 700 | padding: 0; 701 | } 702 | 703 | footer { 704 | margin-left: 0; 705 | } 706 | } 707 | 708 | /** Add a '#' to static members */ 709 | [data-type="member"] a::before { 710 | content: '#'; 711 | display: inline-block; 712 | margin-left: -14px; 713 | margin-right: 5px; 714 | } 715 | 716 | #disqus_thread{ 717 | margin-left: 30px; 718 | } 719 | 720 | @font-face { 721 | font-family: 'Montserrat'; 722 | font-style: normal; 723 | font-weight: 400; 724 | src: url('../fonts/Montserrat/Montserrat-Regular.eot'); /* IE9 Compat Modes */ 725 | src: url('../fonts/Montserrat/Montserrat-Regular.eot?#iefix') format('embedded-opentype'), /* IE6-IE8 */ 726 | url('../fonts/Montserrat/Montserrat-Regular.woff2') format('woff2'), /* Super Modern Browsers */ 727 | url('../fonts/Montserrat/Montserrat-Regular.woff') format('woff'), /* Pretty Modern Browsers */ 728 | url('../fonts/Montserrat/Montserrat-Regular.ttf') format('truetype'); /* Safari, Android, iOS */ 729 | } 730 | 731 | @font-face { 732 | font-family: 'Montserrat'; 733 | font-style: normal; 734 | font-weight: 700; 735 | src: url('../fonts/Montserrat/Montserrat-Bold.eot'); /* IE9 Compat Modes */ 736 | src: url('../fonts/Montserrat/Montserrat-Bold.eot?#iefix') format('embedded-opentype'), /* IE6-IE8 */ 737 | url('../fonts/Montserrat/Montserrat-Bold.woff2') format('woff2'), /* Super Modern Browsers */ 738 | url('../fonts/Montserrat/Montserrat-Bold.woff') format('woff'), /* Pretty Modern Browsers */ 739 | url('../fonts/Montserrat/Montserrat-Bold.ttf') format('truetype'); /* Safari, Android, iOS */ 740 | } 741 | 742 | @font-face { 743 | font-family: 'Source Sans Pro'; 744 | src: url('../fonts/Source-Sans-Pro/sourcesanspro-regular-webfont.eot'); 745 | src: url('../fonts/Source-Sans-Pro/sourcesanspro-regular-webfont.eot?#iefix') format('embedded-opentype'), 746 | url('../fonts/Source-Sans-Pro/sourcesanspro-regular-webfont.woff2') format('woff2'), 747 | url('../fonts/Source-Sans-Pro/sourcesanspro-regular-webfont.woff') format('woff'), 748 | url('../fonts/Source-Sans-Pro/sourcesanspro-regular-webfont.ttf') format('truetype'), 749 | url('../fonts/Source-Sans-Pro/sourcesanspro-regular-webfont.svg#source_sans_proregular') format('svg'); 750 | font-weight: 400; 751 | font-style: normal; 752 | } 753 | 754 | @font-face { 755 | font-family: 'Source Sans Pro'; 756 | src: url('../fonts/Source-Sans-Pro/sourcesanspro-light-webfont.eot'); 757 | src: url('../fonts/Source-Sans-Pro/sourcesanspro-light-webfont.eot?#iefix') format('embedded-opentype'), 758 | url('../fonts/Source-Sans-Pro/sourcesanspro-light-webfont.woff2') format('woff2'), 759 | url('../fonts/Source-Sans-Pro/sourcesanspro-light-webfont.woff') format('woff'), 760 | url('../fonts/Source-Sans-Pro/sourcesanspro-light-webfont.ttf') format('truetype'), 761 | url('../fonts/Source-Sans-Pro/sourcesanspro-light-webfont.svg#source_sans_prolight') format('svg'); 762 | font-weight: 300; 763 | font-style: normal; 764 | 765 | } -------------------------------------------------------------------------------- /docs/Filter.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | Filter - Documentation 7 | 8 | 9 | 10 | 11 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 25 | 26 | 27 | 28 | 32 | 33 |
34 | 35 |

Filter

36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 |
44 | 45 |
46 | 47 |

48 | Filter 49 |

50 | 51 | 52 |
53 | 54 |
55 | 56 |
57 | 58 | 59 | 60 | 61 | 62 |

new Filter(useDefaultWords, excludeWords, replaceBy)

63 | 64 | 65 | 66 | 67 | 68 | 69 |
70 | 71 | 72 |
Source:
73 |
76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | 96 | 97 | 98 | 99 | 100 | 101 | 102 | 103 | 104 | 105 | 106 | 107 |
108 | 109 | 110 | 111 | 112 | 113 |
114 |

Filter object constructor

115 |
116 | 117 | 118 | 119 | 120 | 121 | 122 | 123 | 124 | 125 | 126 | 127 |
Parameters:
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 | 163 | 164 | 165 | 166 | 167 | 168 | 169 | 170 | 171 | 172 | 173 | 174 | 175 | 176 | 177 | 178 | 186 | 187 | 188 | 189 | 190 | 191 | 192 | 193 | 194 | 195 | 196 | 197 | 198 | 199 | 200 | 201 | 209 | 210 | 211 | 212 | 213 | 214 | 215 | 216 | 217 | 218 | 219 |
NameTypeDescription
useDefaultWords 156 | 157 | 158 | boolean 159 | 160 | 161 | 162 |

Use the default set of obscene words

excludeWords 179 | 180 | 181 | array 182 | 183 | 184 | 185 |

Words to exclude from obscenity set

replaceBy 202 | 203 | 204 | string 205 | 206 | 207 | 208 |

Character used to replace obscene words

220 | 221 | 222 | 223 | 224 | 225 | 226 | 227 | 228 | 229 | 230 | 231 | 232 | 233 | 234 | 235 | 236 | 237 | 238 | 239 | 240 |
241 | 242 | 243 | 244 | 245 | 246 | 247 | 248 | 249 | 250 | 251 | 252 | 253 | 254 | 255 | 256 | 257 | 258 |

Methods

259 | 260 | 261 | 262 | 263 | 264 | 265 |

addWord(word, labels)

266 | 267 | 268 | 269 | 270 | 271 | 272 |
273 | 274 | 275 |
Source:
276 |
279 | 280 | 281 | 282 | 283 | 284 | 285 | 286 | 287 | 288 | 289 | 290 | 291 | 292 | 293 | 294 | 295 | 296 | 297 | 298 | 299 | 300 | 301 | 302 | 303 | 304 | 305 | 306 | 307 | 308 | 309 | 310 |
311 | 312 | 313 | 314 | 315 | 316 |
317 |

Add single word to the set of obscenity words

318 |
319 | 320 | 321 | 322 | 323 | 324 | 325 | 326 | 327 | 328 | 329 | 330 |
Parameters:
331 | 332 | 333 | 334 | 335 | 336 | 337 | 338 | 339 | 340 | 341 | 342 | 343 | 344 | 345 | 346 | 347 | 348 | 349 | 350 | 351 | 352 | 353 | 354 | 355 | 356 | 357 | 358 | 366 | 367 | 368 | 369 | 370 | 371 | 372 | 373 | 374 | 375 | 376 | 377 | 378 | 379 | 380 | 381 | 389 | 390 | 391 | 392 | 393 | 394 | 395 | 396 | 397 | 398 | 399 |
NameTypeDescription
word 359 | 360 | 361 | string 362 | 363 | 364 | 365 |
labels 382 | 383 | 384 | array 385 | 386 | 387 | 388 |

Labels of the new word: Existing labels are [PN, RT, IN, NO]

400 | 401 | 402 | 403 | 404 | 405 | 406 | 407 | 408 | 409 | 410 | 411 | 412 | 413 | 414 | 415 | 416 | 417 | 418 | 419 | 420 | 421 | 422 | 423 | 424 |

addWords(words, labels)

425 | 426 | 427 | 428 | 429 | 430 | 431 |
432 | 433 | 434 |
Source:
435 |
438 | 439 | 440 | 441 | 442 | 443 | 444 | 445 | 446 | 447 | 448 | 449 | 450 | 451 | 452 | 453 | 454 | 455 | 456 | 457 | 458 | 459 | 460 | 461 | 462 | 463 | 464 | 465 | 466 | 467 | 468 | 469 |
470 | 471 | 472 | 473 | 474 | 475 |
476 |

Add new words to obscenity set

477 |
478 | 479 | 480 | 481 | 482 | 483 | 484 | 485 | 486 | 487 | 488 | 489 |
Parameters:
490 | 491 | 492 | 493 | 494 | 495 | 496 | 497 | 498 | 499 | 500 | 501 | 502 | 503 | 504 | 505 | 506 | 507 | 508 | 509 | 510 | 511 | 512 | 513 | 514 | 515 | 516 | 517 | 525 | 526 | 527 | 528 | 529 | 530 | 531 | 532 | 533 | 534 | 535 | 536 | 537 | 538 | 539 | 540 | 548 | 549 | 550 | 551 | 552 | 553 | 554 | 555 | 556 | 557 | 558 |
NameTypeDescription
words 518 | 519 | 520 | array 521 | 522 | 523 | 524 |

New words to add to obscenity set

labels 541 | 542 | 543 | array 544 | 545 | 546 | 547 |

An array of arrays with all the labels for each new word

559 | 560 | 561 | 562 | 563 | 564 | 565 | 566 | 567 | 568 | 569 | 570 | 571 | 572 | 573 | 574 | 575 | 576 | 577 | 578 | 579 | 580 | 581 | 582 | 583 |

containsObscenity(phrase) → {boolean}

584 | 585 | 586 | 587 | 588 | 589 | 590 |
591 | 592 | 593 |
Source:
594 |
597 | 598 | 599 | 600 | 601 | 602 | 603 | 604 | 605 | 606 | 607 | 608 | 609 | 610 | 611 | 612 | 613 | 614 | 615 | 616 | 617 | 618 | 619 | 620 | 621 | 622 | 623 | 624 | 625 | 626 | 627 | 628 |
629 | 630 | 631 | 632 | 633 | 634 |
635 |

Checks if a phrase/sentence contains any obscene word. 636 | Splits the string by whitespace before checking each word for obscenity.

637 |
638 | 639 | 640 | 641 | 642 | 643 | 644 | 645 | 646 | 647 | 648 | 649 |
Parameters:
650 | 651 | 652 | 653 | 654 | 655 | 656 | 657 | 658 | 659 | 660 | 661 | 662 | 663 | 664 | 665 | 666 | 667 | 668 | 669 | 670 | 671 | 672 | 673 | 674 | 675 | 676 | 677 | 685 | 686 | 687 | 688 | 689 | 690 | 691 | 692 | 693 | 694 | 695 |
NameTypeDescription
phrase 678 | 679 | 680 | string 681 | 682 | 683 | 684 |
696 | 697 | 698 | 699 | 700 | 701 | 702 | 703 | 704 | 705 | 706 | 707 | 708 | 709 | 710 | 711 | 712 |
Returns:
713 | 714 | 715 | 716 | 717 |
718 |
719 | Type 720 |
721 |
722 | 723 | boolean 724 | 725 | 726 |
727 |
728 | 729 | 730 | 731 | 732 | 733 | 734 | 735 | 736 | 737 | 738 |

getLabels(word) → {array}

739 | 740 | 741 | 742 | 743 | 744 | 745 |
746 | 747 | 748 |
Source:
749 |
752 | 753 | 754 | 755 | 756 | 757 | 758 | 759 | 760 | 761 | 762 | 763 | 764 | 765 | 766 | 767 | 768 | 769 | 770 | 771 | 772 | 773 | 774 | 775 | 776 | 777 | 778 | 779 | 780 | 781 | 782 | 783 |
784 | 785 | 786 | 787 | 788 | 789 |
790 |

Returns the categorizing labels for a given obscene word. 791 | Returns an empty array if isPure(word) == true.

792 |
793 | 794 | 795 | 796 | 797 | 798 | 799 | 800 | 801 | 802 | 803 | 804 |
Parameters:
805 | 806 | 807 | 808 | 809 | 810 | 811 | 812 | 813 | 814 | 815 | 816 | 817 | 818 | 819 | 820 | 821 | 822 | 823 | 824 | 825 | 826 | 827 | 828 | 829 | 830 | 831 | 832 | 840 | 841 | 842 | 843 | 844 | 845 | 846 | 847 | 848 | 849 | 850 |
NameTypeDescription
word 833 | 834 | 835 | string 836 | 837 | 838 | 839 |
851 | 852 | 853 | 854 | 855 | 856 | 857 | 858 | 859 | 860 | 861 | 862 | 863 | 864 | 865 | 866 | 867 |
Returns:
868 | 869 | 870 | 871 | 872 |
873 |
874 | Type 875 |
876 |
877 | 878 | array 879 | 880 | 881 |
882 |
883 | 884 | 885 | 886 | 887 | 888 | 889 | 890 | 891 | 892 | 893 |

isPure(word) → {boolean}

894 | 895 | 896 | 897 | 898 | 899 | 900 |
901 | 902 | 903 |
Source:
904 |
907 | 908 | 909 | 910 | 911 | 912 | 913 | 914 | 915 | 916 | 917 | 918 | 919 | 920 | 921 | 922 | 923 | 924 | 925 | 926 | 927 | 928 | 929 | 930 | 931 | 932 | 933 | 934 | 935 | 936 | 937 | 938 |
939 | 940 | 941 | 942 | 943 | 944 |
945 |

Checks if a word is obscene. 946 | Returns true if the word is not obscene

947 |
948 | 949 | 950 | 951 | 952 | 953 | 954 | 955 | 956 | 957 | 958 | 959 |
Parameters:
960 | 961 | 962 | 963 | 964 | 965 | 966 | 967 | 968 | 969 | 970 | 971 | 972 | 973 | 974 | 975 | 976 | 977 | 978 | 979 | 980 | 981 | 982 | 983 | 984 | 985 | 986 | 987 | 995 | 996 | 997 | 998 | 999 | 1000 | 1001 | 1002 | 1003 | 1004 | 1005 |
NameTypeDescription
word 988 | 989 | 990 | string 991 | 992 | 993 | 994 |
1006 | 1007 | 1008 | 1009 | 1010 | 1011 | 1012 | 1013 | 1014 | 1015 | 1016 | 1017 | 1018 | 1019 | 1020 | 1021 | 1022 |
Returns:
1023 | 1024 | 1025 | 1026 | 1027 |
1028 |
1029 | Type 1030 |
1031 |
1032 | 1033 | boolean 1034 | 1035 | 1036 |
1037 |
1038 | 1039 | 1040 | 1041 | 1042 | 1043 | 1044 | 1045 | 1046 | 1047 | 1048 |

removeWord(word)

1049 | 1050 | 1051 | 1052 | 1053 | 1054 | 1055 |
1056 | 1057 | 1058 |
Source:
1059 |
1062 | 1063 | 1064 | 1065 | 1066 | 1067 | 1068 | 1069 | 1070 | 1071 | 1072 | 1073 | 1074 | 1075 | 1076 | 1077 | 1078 | 1079 | 1080 | 1081 | 1082 | 1083 | 1084 | 1085 | 1086 | 1087 | 1088 | 1089 | 1090 | 1091 | 1092 | 1093 |
1094 | 1095 | 1096 | 1097 | 1098 | 1099 |
1100 |

Remove single word from the set of obscenity words

1101 |
1102 | 1103 | 1104 | 1105 | 1106 | 1107 | 1108 | 1109 | 1110 | 1111 | 1112 | 1113 |
Parameters:
1114 | 1115 | 1116 | 1117 | 1118 | 1119 | 1120 | 1121 | 1122 | 1123 | 1124 | 1125 | 1126 | 1127 | 1128 | 1129 | 1130 | 1131 | 1132 | 1133 | 1134 | 1135 | 1136 | 1137 | 1138 | 1139 | 1140 | 1141 | 1149 | 1150 | 1151 | 1152 | 1153 | 1154 | 1155 | 1156 | 1157 | 1158 | 1159 |
NameTypeDescription
word 1142 | 1143 | 1144 | string 1145 | 1146 | 1147 | 1148 |
1160 | 1161 | 1162 | 1163 | 1164 | 1165 | 1166 | 1167 | 1168 | 1169 | 1170 | 1171 | 1172 | 1173 | 1174 | 1175 | 1176 | 1177 | 1178 | 1179 | 1180 | 1181 | 1182 | 1183 | 1184 |

removeWords(words)

1185 | 1186 | 1187 | 1188 | 1189 | 1190 | 1191 |
1192 | 1193 | 1194 |
Source:
1195 |
1198 | 1199 | 1200 | 1201 | 1202 | 1203 | 1204 | 1205 | 1206 | 1207 | 1208 | 1209 | 1210 | 1211 | 1212 | 1213 | 1214 | 1215 | 1216 | 1217 | 1218 | 1219 | 1220 | 1221 | 1222 | 1223 | 1224 | 1225 | 1226 | 1227 | 1228 | 1229 |
1230 | 1231 | 1232 | 1233 | 1234 | 1235 |
1236 |

Remove words from the set of obscenity words

1237 |
1238 | 1239 | 1240 | 1241 | 1242 | 1243 | 1244 | 1245 | 1246 | 1247 | 1248 | 1249 |
Parameters:
1250 | 1251 | 1252 | 1253 | 1254 | 1255 | 1256 | 1257 | 1258 | 1259 | 1260 | 1261 | 1262 | 1263 | 1264 | 1265 | 1266 | 1267 | 1268 | 1269 | 1270 | 1271 | 1272 | 1273 | 1274 | 1275 | 1276 | 1277 | 1285 | 1286 | 1287 | 1288 | 1289 | 1290 | 1291 | 1292 | 1293 | 1294 | 1295 |
NameTypeDescription
words 1278 | 1279 | 1280 | list 1281 | 1282 | 1283 | 1284 |

A list of strings

1296 | 1297 | 1298 | 1299 | 1300 | 1301 | 1302 | 1303 | 1304 | 1305 | 1306 | 1307 | 1308 | 1309 | 1310 | 1311 | 1312 | 1313 | 1314 | 1315 | 1316 | 1317 | 1318 | 1319 | 1320 |

scrub(phrase) → {string}

1321 | 1322 | 1323 | 1324 | 1325 | 1326 | 1327 |
1328 | 1329 | 1330 |
Source:
1331 |
1334 | 1335 | 1336 | 1337 | 1338 | 1339 | 1340 | 1341 | 1342 | 1343 | 1344 | 1345 | 1346 | 1347 | 1348 | 1349 | 1350 | 1351 | 1352 | 1353 | 1354 | 1355 | 1356 | 1357 | 1358 | 1359 | 1360 | 1361 | 1362 | 1363 | 1364 | 1365 |
1366 | 1367 | 1368 | 1369 | 1370 | 1371 |
1372 |

Scrubs all obscene words and replaces them with asterisk characters.

1373 |
1374 | 1375 | 1376 | 1377 | 1378 | 1379 | 1380 | 1381 | 1382 | 1383 | 1384 | 1385 |
Parameters:
1386 | 1387 | 1388 | 1389 | 1390 | 1391 | 1392 | 1393 | 1394 | 1395 | 1396 | 1397 | 1398 | 1399 | 1400 | 1401 | 1402 | 1403 | 1404 | 1405 | 1406 | 1407 | 1408 | 1409 | 1410 | 1411 | 1412 | 1413 | 1421 | 1422 | 1423 | 1424 | 1425 | 1426 | 1427 | 1428 | 1429 | 1430 | 1431 |
NameTypeDescription
phrase 1414 | 1415 | 1416 | string 1417 | 1418 | 1419 | 1420 |
1432 | 1433 | 1434 | 1435 | 1436 | 1437 | 1438 | 1439 | 1440 | 1441 | 1442 | 1443 | 1444 | 1445 | 1446 | 1447 | 1448 |
Returns:
1449 | 1450 | 1451 | 1452 | 1453 |
1454 |
1455 | Type 1456 |
1457 |
1458 | 1459 | string 1460 | 1461 | 1462 |
1463 |
1464 | 1465 | 1466 | 1467 | 1468 | 1469 | 1470 | 1471 | 1472 | 1473 | 1474 | 1475 |
1476 | 1477 |
1478 | 1479 | 1480 | 1481 | 1482 | 1483 | 1484 |
1485 | 1486 |
1487 | 1488 |
1489 | Documentation generated by JSDoc 3.6.6 on Tue Dec 22 2020 17:03:45 GMT-0500 (Eastern Standard Time) using the docdash theme. 1490 |
1491 | 1492 | 1493 | 1494 | 1495 | 1496 | 1497 | 1498 | 1499 | -------------------------------------------------------------------------------- /docs/fonts/Source-Sans-Pro/sourcesanspro-light-webfont.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | 96 | 97 | 98 | 99 | 100 | 101 | 102 | 103 | 104 | 105 | 106 | 107 | 108 | 109 | 110 | 111 | 112 | 113 | 114 | 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 | 167 | 168 | 169 | 170 | 171 | 172 | 173 | 174 | 175 | 176 | 177 | 178 | 179 | 180 | 181 | 182 | 183 | 184 | 185 | 186 | 187 | 188 | 189 | 190 | 191 | 192 | 193 | 194 | 195 | 196 | 197 | 198 | 199 | 200 | 201 | 202 | 203 | 204 | 205 | 206 | 207 | 208 | 209 | 210 | 211 | 212 | 213 | 214 | 215 | 216 | 217 | 218 | 219 | 220 | 221 | 222 | 223 | 224 | 225 | 226 | 227 | 228 | 229 | 230 | 231 | 232 | 233 | 234 | 235 | 236 | 237 | 238 | 239 | 240 | 241 | 242 | 243 | 244 | 245 | 246 | 247 | 248 | 249 | 250 | 251 | 252 | 253 | 254 | 255 | 256 | 257 | 258 | 259 | 260 | 261 | 262 | 263 | 264 | 265 | 266 | 267 | 268 | 269 | 270 | 271 | 272 | 273 | 274 | 275 | 276 | 277 | 278 | 279 | 280 | 281 | 282 | 283 | 284 | 285 | 286 | 287 | 288 | 289 | 290 | 291 | 292 | 293 | 294 | 295 | 296 | 297 | 298 | 299 | 300 | 301 | 302 | 303 | 304 | 305 | 306 | 307 | 308 | 309 | 310 | 311 | 312 | 313 | 314 | 315 | 316 | 317 | 318 | 319 | 320 | 321 | 322 | 323 | 324 | 325 | 326 | 327 | 328 | 329 | 330 | 331 | 332 | 333 | 334 | 335 | 336 | 337 | 338 | 339 | 340 | 341 | 342 | 343 | 344 | 345 | 346 | 347 | 348 | 349 | 350 | 351 | 352 | 353 | 354 | 355 | 356 | 357 | 358 | 359 | 360 | 361 | 362 | 363 | 364 | 365 | 366 | 367 | 368 | 369 | 370 | 371 | 372 | 373 | 374 | 375 | 376 | 377 | 378 | 379 | 380 | 381 | 382 | 383 | 384 | 385 | 386 | 387 | 388 | 389 | 390 | 391 | 392 | 393 | 394 | 395 | 396 | 397 | 398 | 399 | 400 | 401 | 402 | 403 | 404 | 405 | 406 | 407 | 408 | 409 | 410 | 411 | 412 | 413 | 414 | 415 | 416 | 417 | 418 | 419 | 420 | 421 | 422 | 423 | 424 | 425 | 426 | 427 | 428 | 429 | 430 | 431 | 432 | 433 | 434 | 435 | 436 | 437 | 438 | 439 | 440 | 441 | 442 | 443 | 444 | 445 | 446 | 447 | 448 | 449 | 450 | 451 | 452 | 453 | 454 | 455 | 456 | 457 | 458 | 459 | 460 | 461 | 462 | 463 | 464 | 465 | 466 | 467 | 468 | 469 | 470 | 471 | 472 | 473 | 474 | 475 | 476 | 477 | 478 | 479 | 480 | 481 | 482 | 483 | 484 | 485 | 486 | 487 | 488 | 489 | 490 | 491 | 492 | 493 | 494 | 495 | 496 | 497 | 498 | 499 | 500 | 501 | 502 | 503 | 504 | 505 | 506 | 507 | 508 | 509 | 510 | 511 | 512 | 513 | 514 | 515 | 516 | 517 | 518 | 519 | 520 | 521 | 522 | 523 | 524 | 525 | 526 | 527 | 528 | 529 | 530 | 531 | 532 | 533 | 534 | 535 | 536 | 537 | 538 | 539 | 540 | 541 | 542 | 543 | 544 | 545 | 546 | 547 | 548 | 549 | 550 | 551 | 552 | 553 | 554 | 555 | 556 | 557 | 558 | 559 | 560 | 561 | 562 | 563 | 564 | 565 | 566 | 567 | 568 | 569 | 570 | 571 | 572 | 573 | 574 | 575 | 576 | 577 | 578 | 579 | 580 | 581 | 582 | 583 | 584 | 585 | 586 | 587 | 588 | 589 | 590 | 591 | 592 | 593 | 594 | 595 | 596 | 597 | 598 | 599 | 600 | 601 | 602 | 603 | 604 | 605 | 606 | 607 | 608 | 609 | 610 | 611 | 612 | 613 | 614 | 615 | 616 | 617 | 618 | 619 | 620 | 621 | 622 | 623 | 624 | 625 | 626 | 627 | 628 | 629 | 630 | 631 | 632 | 633 | 634 | 635 | 636 | 637 | 638 | 639 | 640 | 641 | 642 | 643 | 644 | 645 | 646 | 647 | 648 | 649 | 650 | 651 | 652 | 653 | 654 | 655 | 656 | 657 | 658 | 659 | 660 | 661 | 662 | 663 | 664 | 665 | 666 | 667 | 668 | 669 | 670 | 671 | 672 | 673 | 674 | 675 | 676 | 677 | 678 | 679 | 680 | 681 | 682 | 683 | 684 | 685 | 686 | 687 | 688 | 689 | 690 | 691 | 692 | 693 | 694 | 695 | 696 | 697 | 698 | 699 | 700 | 701 | 702 | 703 | 704 | 705 | 706 | 707 | 708 | 709 | 710 | 711 | 712 | 713 | 714 | 715 | 716 | 717 | 718 | 719 | 720 | 721 | 722 | 723 | 724 | 725 | 726 | 727 | 728 | 729 | 730 | 731 | 732 | 733 | 734 | 735 | 736 | 737 | 738 | 739 | 740 | 741 | 742 | 743 | 744 | 745 | 746 | 747 | 748 | 749 | 750 | 751 | 752 | 753 | 754 | 755 | 756 | 757 | 758 | 759 | 760 | 761 | 762 | 763 | 764 | 765 | 766 | 767 | 768 | 769 | 770 | 771 | 772 | 773 | 774 | 775 | 776 | 777 | 778 | 779 | 780 | 781 | 782 | 783 | 784 | 785 | 786 | 787 | 788 | 789 | 790 | 791 | 792 | 793 | 794 | 795 | 796 | 797 | 798 | 799 | 800 | 801 | 802 | 803 | 804 | 805 | 806 | 807 | 808 | 809 | 810 | 811 | 812 | 813 | 814 | 815 | 816 | 817 | 818 | 819 | 820 | 821 | 822 | 823 | 824 | 825 | 826 | 827 | 828 | 829 | 830 | 831 | 832 | 833 | 834 | 835 | 836 | 837 | 838 | 839 | 840 | 841 | 842 | 843 | 844 | 845 | 846 | 847 | 848 | 849 | 850 | 851 | 852 | 853 | 854 | 855 | 856 | 857 | 858 | 859 | 860 | 861 | 862 | 863 | 864 | 865 | 866 | 867 | 868 | 869 | 870 | 871 | 872 | 873 | 874 | 875 | 876 | 877 | 878 | 879 | 880 | 881 | 882 | 883 | 884 | 885 | 886 | 887 | 888 | 889 | 890 | 891 | 892 | 893 | 894 | 895 | 896 | 897 | 898 | 899 | 900 | 901 | 902 | 903 | 904 | 905 | 906 | 907 | 908 | 909 | 910 | 911 | 912 | 913 | 914 | 915 | 916 | 917 | 918 | 919 | 920 | 921 | 922 | 923 | 924 | 925 | 926 | 927 | 928 | 929 | 930 | 931 | 932 | 933 | 934 | 935 | 936 | 937 | 938 | 939 | 940 | 941 | 942 | 943 | 944 | 945 | 946 | 947 | 948 | 949 | 950 | 951 | 952 | 953 | 954 | 955 | 956 | 957 | 958 | 959 | 960 | 961 | 962 | 963 | 964 | 965 | 966 | 967 | 968 | 969 | 970 | 971 | 972 | 973 | 974 | 975 | 976 | 977 | 978 | --------------------------------------------------------------------------------