From 6aedae246f3f61c389ed564758cafc31d3118245 Mon Sep 17 00:00:00 2001 From: jk Date: Sat, 21 Jan 2017 06:37:36 +0900 Subject: [PATCH] update option --- lib/badwords.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/badwords.js b/lib/badwords.js index e13a15d..ed1070b 100644 --- a/lib/badwords.js +++ b/lib/badwords.js @@ -4,7 +4,7 @@ var Filter = (function() { this.list = options.emptyList && [] || 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; - this.replaceregex = options.replaceregex || /\w/g; + this.replaceRegex = options.replaceRegex || /\w/g; } Filter.prototype.isProfane = function isProfane(string) { @@ -19,7 +19,7 @@ var Filter = (function() { }; Filter.prototype.replaceWord = function replaceWord(string) { - return string.replace(this.regex, '').replace(this.replaceregex, this.placeHolder); + return string.replace(this.regex, '').replace(this.replaceRegex, this.placeHolder); }; Filter.prototype.clean = function clean(string) {