Skip to content

Commit

Permalink
update documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
web-mech committed Jul 30, 2014
1 parent 5ed4c82 commit 645c795
Showing 1 changed file with 32 additions and 11 deletions.
43 changes: 32 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,32 +1,53 @@
badwords
badwords v0.5.0
========

A javascript filter for badwords

```javascript
```
npm install bad-words
```
#Examples
```javascript
```
var filter = require('bad-words');
console.log(filter.clean("Don't be an ash0le"));
```
Outputs:

#####Outputs:
```
Don't be an ******
```

#String Helper
###Factory
Allows the creation of new instances of a filter

```javascript
require('bad-words');
```
var filter = require('bad-words');
var customFilter = new filter.Factory();
console.log("Don't be an ash0le".clean());
customFilter.clean('Bad words...');
```
Outputs:

Don't be an ******
###Placeholder Overrides

```
var filter = require('bad-words');
var customFilter = new filter.Factory({ placeHolder: 'x'});
customFilter.clean('Don't be an ash0le');
```

#####Outputs:
```
Don't be an xxxxxx
```
#String Helper

Will no longer be supported and removed in the next release.

#Testing
```
mocha
```
========

The MIT License (MIT)
Expand Down

0 comments on commit 645c795

Please sign in to comment.