wordsmith-js

0.1.0 • Public • Published

readability-js

Build Status

Hello, there! I thought it would be interesting to implement some readability algorithms in javascript.

Documentation

Everything is written in ES6, transpiled by Babel, and bundled using Browserify. Tests are written with Mocha.

All of the functionality is found in the Wordsmith object. Here is an overview of its methods:

  • Wordsmith.syllableCount(data) : where data can be a string or an array of strings. Returns the total number of syllables found in the string or null if you input an invalid value.
  • Wordsmith.sentenceCount(string) : returns the number of sentences found in the string by using the delimiter /[\.?!]/
  • Wordsmith.wordCount(string) : returns the number of words found in the string.
  • Wordsmith.removePuctuation(string) : removes everything except spaces and A-z characters.

These methods are used to implement these readability algorithms:

Building

Just run npm run build. This will place readability.min.js into the dist/ directory.

Running Tests

Just run npm run test

Package Sidebar

Install

npm i wordsmith-js

Weekly Downloads

7

Version

0.1.0

License

MIT

Last publish

Collaborators

  • squitty