cgiffard / TextStatistics.js

Generate information about text including syllable counts and Flesch-Kincaid, Gunning-Fog, Coleman-Liau, SMOG and Automated Readability scores.
MIT License
191 stars 37 forks source link

Updated check on problemWords property #5

Closed Techworker closed 10 years ago

Techworker commented 10 years ago

We end up with NaN values when the current word is a non-direct property of the problemWords object.

Error: problemWords["constructor"] => function() { ... }

Solution: problemWords.hasOwnProperty("constructor") => false

cgiffard commented 10 years ago

Looks good, thanks for that. I'm travelling this weekend but hope to push to npm soon!