Skip to content

Commit

Permalink
add ability to pass a list when constructing a filter
Browse files Browse the repository at this point in the history
  • Loading branch information
web-mech committed Oct 1, 2015
1 parent 5bd7fe6 commit 8c34c78
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/badwords.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
var Filter = (function() {
function Filter(options) {
options = options || {};
this.list = Array.prototype.concat.apply(require('./lang.json').words, require('badwords-list').array);
this.list = Array.prototype.concat.apply(require('./lang.json').words, [require('badwords-list').array, options.list || []]);
this.placeHolder = options.placeHolder || '*';
this.regex = options.regex || /[^a-zA-z0-9|\$|\@]|\^/g;
}
Expand Down

0 comments on commit 8c34c78

Please sign in to comment.