spelledright
This project is a js library used to facilitate spell checks on XML, HTML pages in English. It wraps around cfinke/Typo.js. You can directly take the spelledright.js file and add it to your project.
The Mechanism
The way it works is by:
-
- Parsing all children under a specified XML Node.
-
- Gathering all elements innertext
-
- Going throws the gat hered innertext and (logically) breaking it up into words
-
- Performing a spelling check on each word according to the desired options config
Example Usage
// 1) Load a page using a UI test driver ex.// selenium-webdriver (https://www.npmjs.com/package/selenium-webdriver)let driver = ;driver
Note See the spec files for concrete examples.
Additional Usage
To run this project locally, or contribute:
-
npm install
Make sure everything is installed.
- 2)
grunt babel
Convert es6 files to the js counterparts. -
npm run-script unittest && npm run-script perftest
Make sure tests are working.
-
grunt watch
Anytime before developing. Note: The project is linted extend from google.
-
- Develop!
-
- Don't forget to add tests and test it out! Let's aim to keep coverage >= 93% Performance benchmarks should be roughly:
- DETAILED_PAGE_BENCHMARK: 1040.511ms
- SIMPLE_PAGE_BENCHMARK: 752.908ms
-
npm build
To ensure everything is in working order.
-
- Now we're talking, make a PR upstream.