isprofanity
Advanced tools
Comparing version 1.0.3 to 1.0.4
@@ -9,3 +9,3 @@ fs = require('fs'); | ||
function loadCSV(callback,file){ | ||
file = typeof(file) == 'string' ? file : 'data/profanity.csv'; | ||
file = typeof(file) == 'string' ? file : __dirname+'/data/profanity.csv'; | ||
if(typeof(callback) != 'function') throw new Error('isProfanity Error: Valid callback not given...'); | ||
@@ -53,3 +53,3 @@ fs.readFile(file, 'utf8', function (err,data) { | ||
function isProfanity(string,callback,customProfanity,customExceptions){ | ||
customExceptions = customExceptions ? customExceptions : 'data/exceptions.csv'; | ||
customExceptions = customExceptions ? customExceptions : __dirname+'/data/exceptions.csv'; | ||
if(typeof(string) != 'string') throw new Error('isProfanity Error: The var \'string\' is not a String...'); | ||
@@ -56,0 +56,0 @@ if(typeof(callback) != 'function') throw new Error('isProfanity Error: Valid callback not given...'); |
{ | ||
"name": "isprofanity", | ||
"version": "1.0.3", | ||
"version": "1.0.4", | ||
"description": "A profanity checker which, unlike alternatives, uses the Wagner–Fischer algorithm in order to catch variations that you haven't thought of. ", | ||
@@ -5,0 +5,0 @@ "main": "isProfanity.js", |
8026