diff --git a/docs/assets/highlight.css b/docs/assets/highlight.css index 5842b1f..b44ce43 100644 --- a/docs/assets/highlight.css +++ b/docs/assets/highlight.css @@ -1,24 +1,28 @@ :root { - --light-hl-0: #0000ff; - --dark-hl-0: #569cd6; + --light-hl-0: #af00db; + --dark-hl-0: #c586c0; --light-hl-1: #000000; --dark-hl-1: #d4d4d4; --light-hl-2: #001080; --dark-hl-2: #9cdcfe; - --light-hl-3: #795e26; - --dark-hl-3: #dcdcaa; - --light-hl-4: #a31515; - --dark-hl-4: #ce9178; - --light-hl-5: #008000; - --dark-hl-5: #6a9955; - --light-hl-6: #811f3f; - --dark-hl-6: #d16969; - --light-hl-7: #ee0000; - --dark-hl-7: #d7ba7d; - --light-hl-8: #ee0000; - --dark-hl-8: #dcdcaa; - --light-hl-9: #d16969; - --dark-hl-9: #ce9178; + --light-hl-3: #a31515; + --dark-hl-3: #ce9178; + --light-hl-4: #0000ff; + --dark-hl-4: #569cd6; + --light-hl-5: #0070c1; + --dark-hl-5: #4fc1ff; + --light-hl-6: #795e26; + --dark-hl-6: #dcdcaa; + --light-hl-7: #008000; + --dark-hl-7: #6a9955; + --light-hl-8: #811f3f; + --dark-hl-8: #d16969; + --light-hl-9: #ee0000; + --dark-hl-9: #d7ba7d; + --light-hl-10: #ee0000; + --dark-hl-10: #dcdcaa; + --light-hl-11: #d16969; + --dark-hl-11: #ce9178; --light-code-background: #ffffff; --dark-code-background: #1e1e1e; } @@ -35,6 +39,8 @@ --hl-7: var(--light-hl-7); --hl-8: var(--light-hl-8); --hl-9: var(--light-hl-9); + --hl-10: var(--light-hl-10); + --hl-11: var(--light-hl-11); --code-background: var(--light-code-background); } } @@ -51,6 +57,8 @@ --hl-7: var(--dark-hl-7); --hl-8: var(--dark-hl-8); --hl-9: var(--dark-hl-9); + --hl-10: var(--dark-hl-10); + --hl-11: var(--dark-hl-11); --code-background: var(--dark-code-background); } } @@ -66,6 +74,8 @@ --hl-7: var(--light-hl-7); --hl-8: var(--light-hl-8); --hl-9: var(--light-hl-9); + --hl-10: var(--light-hl-10); + --hl-11: var(--light-hl-11); --code-background: var(--light-code-background); } @@ -80,6 +90,8 @@ --hl-7: var(--dark-hl-7); --hl-8: var(--dark-hl-8); --hl-9: var(--dark-hl-9); + --hl-10: var(--dark-hl-10); + --hl-11: var(--dark-hl-11); --code-background: var(--dark-code-background); } @@ -113,6 +125,12 @@ .hl-9 { color: var(--hl-9); } +.hl-10 { + color: var(--hl-10); +} +.hl-11 { + color: var(--hl-11); +} pre, code { background: var(--code-background); diff --git a/docs/classes/Filter.html b/docs/classes/Filter.html index 5e4e0eb..e7a6550 100644 --- a/docs/classes/Filter.html +++ b/docs/classes/Filter.html @@ -74,7 +74,7 @@
A javascript filter for badwords
npm install bad-words --save
+ yarn add bad-words
@@ -122,7 +117,7 @@
- var Filter = require('bad-words'),
filter = new Filter();
console.log(filter.clean("Don't be an ash0le")); //Don't be an ******
+ import { Filter } from 'bad-words'
...
const filter = new Filter();
console.log(filter.clean("Don't be an ash0le")); //Don't be an ******
@@ -135,7 +130,7 @@
- var Filter = require('bad-words');
var customFilter = new Filter({ placeHolder: 'x'});
customFilter.clean("Don't be an ash0le"); //Don't be an xxxxxx
+ const customFilter = new Filter({ placeHolder: 'x' })
customFilter.clean("Don't be an ash0le") //Don't be an xxxxxx
@@ -148,7 +143,7 @@
- var filter = new Filter({ regex: /\*|\.|$/gi });
var filter = new Filter({ replaceRegex: /[A-Za-z0-9가-힣_]/g });
//multilingual support for word filtering
+ const filter = new Filter({ regex: /\*|\.|$/gi })
const filter = new Filter({ replaceRegex: /[A-Za-z0-9가-힣_]/g })
//multilingual support for word filtering
@@ -161,7 +156,7 @@
- var filter = new Filter();
filter.addWords('some', 'bad', 'word');
filter.clean("some bad word!") //**** *** ****!
//or use an array using the spread operator
var newBadWords = ['some', 'bad', 'word'];
filter.addWords(...newBadWords);
filter.clean("some bad word!") //**** *** ****!
//or
var filter = new Filter({ list: ['some', 'bad', 'word'] });
filter.clean("some bad word!") //**** *** ****!
+ const filter = new Filter()
filter.addWords('some', 'bad', 'word')
filter.clean('some bad word!') //**** *** ****!
//or use an array using the spread operator
const newBadWords = ['some', 'bad', 'word']
filter.addWords(...newBadWords)
filter.clean('some bad word!') //**** *** ****!
//or
const filter = new Filter({ list: ['some', 'bad', 'word'] })
filter.clean('some bad word!') //**** *** ****!
@@ -174,7 +169,7 @@
- var filter = new Filter({ emptyList: true });
filter.clean('hell this wont clean anything'); //hell this wont clean anything
+ const filter = new Filter({ emptyList: true })
filter.clean('hell this wont clean anything') //hell this wont clean anything
@@ -187,7 +182,7 @@
- let filter = new Filter();
filter.removeWords('hells', 'sadist');
filter.clean("some hells word!"); //some hells word!
//or use an array using the spread operator
let removeWords = ['hells', 'sadist'];
filter.removeWords(...removeWords);
filter.clean("some sadist hells word!"); //some sadist hells word!
+ const filter = new Filter()
filter.removeWords('hells', 'sadist')
filter.clean('some hells word!') //some hells word!
//or use an array using the spread operator
const removeWords = ['hells', 'sadist']
filter.removeWords(...removeWords)
filter.clean('some sadist hells word!') //some sadist hells word!
diff --git a/docs/interfaces/FilterOptions.html b/docs/interfaces/FilterOptions.html
index 7a364c3..55439c8 100644
--- a/docs/interfaces/FilterOptions.html
+++ b/docs/interfaces/FilterOptions.html
@@ -117,7 +117,7 @@ Interface FilterOptions
Defined in
badwords.ts:14
@@ -229,7 +229,7 @@
Defined in
badwords.ts:15
@@ -259,7 +259,7 @@
Defined in
badwords.ts:17
@@ -290,7 +290,7 @@
Defined in
badwords.ts:16
@@ -324,7 +324,7 @@
Defined in
badwords.ts:18
@@ -357,7 +357,7 @@
Defined in
badwords.ts:19
@@ -394,7 +394,7 @@
Defined in
badwords.ts:20
@@ -428,7 +428,7 @@
Defined in
badwords.ts:21
diff --git a/docs/types/LocalList.html b/docs/types/LocalList.html
index b93a0ce..e397ee8 100644
--- a/docs/types/LocalList.html
+++ b/docs/types/LocalList.html
@@ -85,7 +85,7 @@ Type Alias LocalList
Defined in
badwords.ts:29