File tree Expand file tree Collapse file tree 1 file changed +32
-11
lines changed
Expand file tree Collapse file tree 1 file changed +32
-11
lines changed Original file line number Diff line number Diff line change 1- badwords
1+ badwords v0.5.0
22========
33
44A javascript filter for badwords
55
6- ``` javascript
6+ ```
77npm install bad-words
88```
99#Examples
10- ``` javascript
10+ ```
1111var filter = require('bad-words');
1212
1313console.log(filter.clean("Don't be an ash0le"));
1414```
15- Outputs:
16-
15+ ##### Outputs:
16+ ```
1717Don't be an ******
18+ ```
1819
19- #String Helper
20+ ###Factory
21+ Allows the creation of new instances of a filter
2022
21- ``` javascript
22- require (' bad-words' );
23+ ```
24+ var filter = require('bad-words');
25+ var customFilter = new filter.Factory();
2326
24- console . log ( " Don't be an ash0le " . clean () );
27+ customFilter.clean('Bad words...' );
2528```
26- Outputs:
2729
28- Don't be an ***** *
30+ ###Placeholder Overrides
2931
32+ ```
33+ var filter = require('bad-words');
34+ var customFilter = new filter.Factory({ placeHolder: 'x'});
35+
36+ customFilter.clean('Don't be an ash0le');
37+ ```
38+
39+ #####Outputs:
40+ ```
41+ Don't be an xxxxxx
42+ ```
43+ #String Helper
44+
45+ Will no longer be supported and removed in the next release.
46+
47+ #Testing
48+ ```
49+ mocha
50+ ```
3051========
3152
3253The MIT License (MIT)
You can’t perform that action at this time.
0 commit comments