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

ep_readability

Package Overview
Dependencies
Maintainers
1
Versions
20
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ep_readability - npm Package Compare versions

Comparing version 0.0.14 to 0.0.15

2

package.json
{
"name": "ep_readability",
"version": "0.0.14",
"version": "0.0.15",
"description": "Calculates the Flesch readability index in Etherpad, client based.",

@@ -5,0 +5,0 @@ "author": {

@@ -10,3 +10,3 @@ # Click button to calculate the Flesch readability index

The original Flesch index is calculated for the English language. The Amstad index is calculated for the German language.
The original Flesch index is calculated for all languages. German umlauts are replaced (ä = a, ß = ss...).

@@ -13,0 +13,0 @@ ## Readability

@@ -254,4 +254,7 @@ // ----------------------------------------------------------------------------

var lang = 'en';
if(text.match(/ä|Ä|ü|Ü|ö|Ö|ß/gm).length > 0)
lang = 'de';
if(text != null) {
var hits = text.match(/ä|Ä|ü|Ü|ö|Ö|ß/gm);
if(hits != null && hits.length > 0)
lang = 'de';
}
console.log('Language detected: ' + lang);

@@ -271,7 +274,7 @@ return lang;

+ window._('readability.info.advice');
var lang = exports.detectLangage(text);
//var lang = exports.detectLangage(text);
text = exports.cleanText(text);
if(text.length > 0) {
result = exports.fleschReadingEase( text, lang );
result = exports.fleschReadingEase( text, 'en' );
jQuery.each(colorOrder, function(index, item) {

@@ -286,3 +289,3 @@ //alert(result.flesch +" - "+ item)

toolTip = window._('readability.info.fleschIndex') + result.flesch + ' ' + window._('readability.info.fleschScale') + "\n"
+ window._('readability.info.language') + lang + "\n"
//+ window._('readability.info.language') + lang + "\n"
+ window._('readability.info.sentences') + result.sentenceCount + "\n"

@@ -289,0 +292,0 @@ + window._('readability.info.words') + result.wordCount + "\n"

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