diff --git a/dist/wade.js b/dist/wade.js index b766783..add3aaf 100644 --- a/dist/wade.js +++ b/dist/wade.js @@ -101,8 +101,9 @@ var removeStopWords = function(str) { var words = getWords(str); + var i = words.length; - for(var i = 0; i < words.length; i++) { + while((i--) !== 0) { if(stopWords.indexOf(words[i]) !== -1) { words.splice(i, 1); } @@ -215,6 +216,10 @@ } } + Wade.config = { + stopWords: stopWords + }; + Wade.version = "0.3.1"; return Wade; diff --git a/dist/wade.min.js b/dist/wade.min.js index 85ba4d4..c67cdb0 100644 --- a/dist/wade.min.js +++ b/dist/wade.min.js @@ -3,4 +3,4 @@ * Copyright 2017 Kabir Shah * Released under the MIT License */ -!function(e,n){"object"==typeof module&&module.exports?module.exports=n():e.Wade=n()}(this,function(){var e=["about","after","all","also","am","an","and","another","any","are","as","at","be","because","been","before","being","between","both","but","by","came","can","come","could","did","do","each","for","from","get","got","has","had","he","have","her","here","him","himself","his","how","if","in","into","is","it","like","make","many","me","might","more","most","much","must","my","never","now","of","on","only","or","other","our","out","over","said","same","see","should","since","some","still","such","take","than","that","the","their","them","then","there","these","they","this","those","through","to","too","under","up","very","was","way","we","well","were","what","where","which","while","who","with","would","you","your","a","i"],n=/\.|\,|\!/g,r=function(e,n){for(var r=n,t=0;t