Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

stopword

Package Overview
Dependencies
Maintainers
1
Versions
72
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

stopword - npm Package Compare versions

Comparing version 0.1.1 to 0.1.2

lib/stopwords_ar.js

10

lib/stopword.js

@@ -5,12 +5,9 @@ const defaultStopwords = require('./stopwords_en.js').words

stopwords = stopwords || defaultStopwords
if (( Object.prototype.toString.call(tokens) !== '[object Array]' )
|| ( Object.prototype.toString.call(stopwords) !== '[object Array]' )) {
if (typeof tokens !== 'object' || typeof stopwords != 'object'){
throw new Error ('expected Arrays try: removeStopwords(Array[, Array])')
}
return tokens.filter(function (value) {
if (stopwords.indexOf(value.toLowerCase()) === -1)
return value
})
return tokens.filter(value => stopwords.indexOf(value.toLowerCase()) === -1);
}
exports.ar = require('./stopwords_ar.js').words
exports.da = require('./stopwords_da.js').words

@@ -21,2 +18,3 @@ exports.en = require('./stopwords_en.js').words

exports.fr = require('./stopwords_fr.js').words
exports.hi = require('./stopwords_hi.js').words
exports.it = require('./stopwords_it.js').words

@@ -23,0 +21,0 @@ exports.ja = require('./stopwords_ja.js').words

2

lib/stopwords_ja.js

@@ -59,2 +59,2 @@ // Original copyright:

// tell the world about the noise words.
module.exports = words
exports.words = words
{
"name": "stopword",
"version": "0.1.1",
"version": "0.1.2",
"description": "A module for node.js that takes in text and returns text that is stripped of stopwords",

@@ -5,0 +5,0 @@ "main": "lib/stopword.js",

@@ -40,3 +40,3 @@ # stopword

Arrays of stopwords for the following languages are supplied: da, en, es, fa, fr, it, ja, nl, no, pl, pt, ru, sv, zh
Arrays of stopwords for the following languages are supplied: ar, da, en, es, fa, fr, it, ja, nl, no, pl, pt, ru, sv, zh

@@ -43,0 +43,0 @@ ```javascript

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc