Socket
Socket
Sign inDemoInstall

retext-keywords

Package Overview
Dependencies
Maintainers
1
Versions
27
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

retext-keywords - npm Package Compare versions

Comparing version 0.1.2 to 0.1.3

44

index.js

@@ -24,8 +24,2 @@ 'use strict';

/**
* Define `keywords`.
*/
function keywords() {}
/**
* Reverse sort: from 9 to 0.

@@ -147,5 +141,5 @@ *

importantWords[stem] = {
'nodes' : [word],
'stem' : stem,
'score' : 1
'nodes': [word],
'stem': stem,
'score': 1
};

@@ -216,5 +210,5 @@ } else {

return {
'stems' : stems,
'words' : words,
'nodes' : nodes
'stems': stems,
'words': words,
'nodes': nodes
};

@@ -250,5 +244,5 @@ }

return {
'stems' : stems,
'value' : stems.join(' ').toLowerCase(),
'nodes' : merge(prev.nodes, node, next.nodes)
'stems': stems,
'value': stems.join(' ').toLowerCase(),
'nodes': merge(prev.nodes, node, next.nodes)
};

@@ -346,7 +340,7 @@ }

stemmedPhrases[phrase.value] = {
'score' : score,
'weight' : score,
'stems' : stems,
'value' : phrase.value,
'nodes' : [phrase.nodes]
'score': score,
'weight': score,
'stems': stems,
'value': phrase.value,
'nodes': [phrase.nodes]
};

@@ -376,3 +370,3 @@ }

/**
* Define `attach`.
* Define `keywords`.
*

@@ -382,3 +376,3 @@ * @param {Retext}

function attach(retext) {
function keywords(retext) {
var TextOM,

@@ -405,8 +399,2 @@ parentPrototype,

/**
* Expose `attach`.
*/
keywords.attach = attach;
/**
* Expose `keywords`.

@@ -413,0 +401,0 @@ */

{
"name": "retext-keywords",
"version": "0.1.2",
"version": "0.1.3",
"description": "Keyword extraction with Retext",

@@ -15,5 +15,5 @@ "license": "MIT",

"dependencies": {
"retext-porter-stemmer": "^0.2.0",
"retext-pos": "^0.1.5",
"retext-visit": "^0.2.0"
"retext-porter-stemmer": "^0.2.2",
"retext-pos": "^0.1.7",
"retext-visit": "^0.2.2"
},

@@ -26,8 +26,8 @@ "repository": {

"devDependencies": {
"eslint": "^0.8.0",
"eslint": "^0.9.0",
"istanbul": "^0.3.0",
"jscs": "^1.7.0",
"matcha": "^0.5.0",
"mocha": "^1.21.0",
"retext": "^0.3.0-rc.1"
"mocha": "^2.0.0",
"retext": "^0.3.0-rc.2"
},

@@ -38,6 +38,6 @@ "scripts": {

"lint": "npm run lint-api && npm run lint-test && npm run lint-benchmark && npm run lint-style",
"lint-api": "node_modules/.bin/eslint index.js --env node --env browser --rule 'quotes: [2, single], no-cond-assign: false'",
"lint-test": "node_modules/.bin/eslint test.js --env node --env mocha --rule 'quotes: [2, single]'",
"lint-api": "node_modules/.bin/eslint index.js",
"lint-test": "node_modules/.bin/eslint test.js --env mocha",
"lint-benchmark": "node_modules/.bin/eslint benchmark.js --global suite,set,bench,before",
"lint-style": "node_modules/.bin/jscs index.js test.js benchmark.js --reporter=inline",
"lint-benchmark": "node_modules/.bin/eslint benchmark.js --env node --global suite,set,bench,before --rule 'quotes: [2, single]'",
"coverage": "node_modules/.bin/istanbul cover node_modules/.bin/_mocha -- -- test.js",

@@ -44,0 +44,0 @@ "benchmark": "node_modules/.bin/matcha benchmark.js",

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