Skip to content

Commit

Permalink
Merge pull request #27 from eklem/master
Browse files Browse the repository at this point in the history
Making it ES5 compatible
  • Loading branch information
eklem authored Jun 27, 2017
2 parents 16649fa + 47589ee commit 00b5a77
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
4 changes: 3 additions & 1 deletion lib/stopword.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,9 @@ exports.removeStopwords = function(tokens, stopwords) {
if (typeof tokens !== 'object' || typeof stopwords != 'object'){
throw new Error ('expected Arrays try: removeStopwords(Array[, Array])')
}
return tokens.filter(value => stopwords.indexOf(value.toLowerCase()) === -1);
return tokens.filter(function (value) {
return stopwords.indexOf(value.toLowerCase()) === -1
})
}

exports.ar = require('./stopwords_ar.js').words
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "stopword",
"version": "0.1.4",
"version": "0.1.5",
"description": "A module for node.js that takes in text and returns text that is stripped of stopwords",
"main": "lib/stopword.js",
"scripts": {
Expand Down

0 comments on commit 00b5a77

Please sign in to comment.