Skip to content

Commit

Permalink
docs(readme): update usage for addWords in docs
Browse files Browse the repository at this point in the history
  • Loading branch information
web-mech committed Oct 23, 2018
1 parent aec750f commit 327cbc8
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,12 @@ var filter = new Filter({ replaceRegex: /[A-Za-z0-9가-힣_]/g });
```js
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);
Expand All @@ -73,7 +79,7 @@ filter.clean('hell this wont clean anything'); //hell this wont clean anything
```js
let filter = new Filter();

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

filter.clean("some hells word!"); //some hells word!

Expand Down

0 comments on commit 327cbc8

Please sign in to comment.