From 645c7958ee218fca4a00342415b282a0527163a6 Mon Sep 17 00:00:00 2001 From: webmech Date: Wed, 30 Jul 2014 17:44:31 -0400 Subject: [PATCH] update documentation --- README.md | 43 ++++++++++++++++++++++++++++++++----------- 1 file changed, 32 insertions(+), 11 deletions(-) diff --git a/README.md b/README.md index 9d6f531..9986369 100644 --- a/README.md +++ b/README.md @@ -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)