dale-chall-formula
Advanced tools
Comparing version 0.0.1 to 0.1.0
36
index.js
@@ -7,8 +7,14 @@ 'use strict'; | ||
var DIFFICULT_WORD_WEIGHT = 0.1579, | ||
WORD_WEIGHT = 0.0496, | ||
DIFFICULT_WORD_THRESHOLD = 0.05, | ||
PERCENTAGE = 100, | ||
ADJUSTMENT = 3.6365; | ||
var DIFFICULT_WORD_WEIGHT, | ||
WORD_WEIGHT, | ||
DIFFICULT_WORD_THRESHOLD, | ||
PERCENTAGE, | ||
ADJUSTMENT; | ||
DIFFICULT_WORD_WEIGHT = 0.1579; | ||
WORD_WEIGHT = 0.0496; | ||
DIFFICULT_WORD_THRESHOLD = 0.05; | ||
PERCENTAGE = 100; | ||
ADJUSTMENT = 3.6365; | ||
/** | ||
@@ -51,11 +57,13 @@ * Get the grade level of a given value according to the Dale--Chall | ||
var GRADE_MAP = { | ||
4 : [0, 4], | ||
5 : [5, 6], | ||
6 : [7, 8], | ||
7 : [9, 10], | ||
8 : [11, 12], | ||
9 : [13, 15], | ||
10 : [16, Infinity], | ||
NaN : [NaN, NaN] | ||
var GRADE_MAP; | ||
GRADE_MAP = { | ||
4: [0, 4], | ||
5: [5, 6], | ||
6: [7, 8], | ||
7: [9, 10], | ||
8: [11, 12], | ||
9: [13, 15], | ||
10: [16, Infinity], | ||
NaN: [NaN, NaN] | ||
}; | ||
@@ -62,0 +70,0 @@ |
{ | ||
"name": "dale-chall-formula", | ||
"version": "0.0.1", | ||
"version": "0.1.0", | ||
"description": "Formula to detect the grade level of text according to the (revised) Dale-Chall Readability Formula (1995)", | ||
@@ -12,10 +12,2 @@ "license": "MIT", | ||
], | ||
"dependencies": {}, | ||
"devDependencies": { | ||
"eslint": "^0.8.0", | ||
"istanbul": "^0.3.0", | ||
"jscs": "^1.5.0", | ||
"mocha": "^1.20.0" | ||
}, | ||
"author": "Titus Wormer <tituswormer@gmail.com>", | ||
"repository": { | ||
@@ -25,14 +17,19 @@ "type": "git", | ||
}, | ||
"author": "Titus Wormer <tituswormer@gmail.com>", | ||
"devDependencies": { | ||
"eslint": "^0.10.0", | ||
"istanbul": "^0.3.0", | ||
"jscs": "^1.0.0", | ||
"mocha": "^2.0.0" | ||
}, | ||
"scripts": { | ||
"test": "node_modules/.bin/_mocha --reporter spec --check-leaks -u exports spec/dale-chall-formula.spec.js", | ||
"test-travis": "node_modules/.bin/istanbul cover node_modules/.bin/_mocha --report lcovonly -- --reporter spec --check-leaks -u exports spec/dale-chall-formula.spec.js", | ||
"test": "node_modules/.bin/_mocha --reporter spec --check-leaks -u exports test.js", | ||
"test-travis": "node_modules/.bin/istanbul cover node_modules/.bin/_mocha --report lcovonly -- --reporter spec --check-leaks -u exports test.js", | ||
"coverage": "node_modules/.bin/istanbul cover node_modules/.bin/_mocha -- -- test.js", | ||
"lint-api": "node_modules/.bin/eslint index.js", | ||
"lint-test": "node_modules/.bin/eslint test.js --env mocha", | ||
"lint-style": "node_modules/.bin/jscs index.js test.js --reporter=inline", | ||
"lint": "npm run lint-api && npm run lint-test && 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 spec/dale-chall-formula.spec.js --env node --env mocha --rule 'quotes: [2, single], no-loop-func: false'", | ||
"lint-style": "node_modules/.bin/jscs index.js spec/dale-chall-formula.spec.js --reporter=inline", | ||
"install-browser-test": "npm install browserify", | ||
"build-browser-test": "node_modules/.bin/browserify spec/dale-chall-formula.spec.js -o spec/browser.spec.js", | ||
"coverage": "node_modules/.bin/istanbul cover node_modules/.bin/_mocha -- -- spec/dale-chall-formula.spec.js", | ||
"make": "npm run lint && npm run coverage" | ||
} | ||
} |
@@ -1,2 +0,2 @@ | ||
# dale-chall-formula [![Build Status](https://travis-ci.org/wooorm/dale-chall-formula.svg?branch=master)](https://travis-ci.org/wooorm/dale-chall-formula) [![Coverage Status](https://img.shields.io/coveralls/wooorm/dale-chall-formula.svg)](https://coveralls.io/r/wooorm/dale-chall-formula?branch=master) | ||
# dale-chall-formula [![Build Status](https://img.shields.io/travis/wooorm/dale-chall-formula.svg?style=flat)](https://travis-ci.org/wooorm/dale-chall-formula) [![Coverage Status](https://img.shields.io/coveralls/wooorm/dale-chall-formula.svg?style=flat)](https://coveralls.io/r/wooorm/dale-chall-formula?branch=master) | ||
@@ -79,2 +79,2 @@ Formula to detect the grade level of text according to the (revised) Dale–Chall Readability Formula. | ||
MIT © Titus Wormer | ||
MIT © [Titus Wormer](http://wooorm.com) |
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
7268
4
74
1