misspellings
JavaScript module to serve the list of common misspellings from Wikipedia: Lists of common misspellings.
Installing
npm install --save misspellings
Usage
var misspellings = ; // Dictionary accessvar dict = misspellings;console; // => "address"console; // => "bout,boat,about" (comma-separated string)console; // => "America"console; // => undefined // Lower-case dictionaryvar lcDict = misspellings;console; // => undefinedconsole; // => "America" // Get correct words for misspelling wordconsole; // => ["address"] (Always returns an array)console; // => ["bout", "boat", "about"]console; // => []console; // => ["America"]console; // => ["America"] (Case-insensitive by default)console; // => [] // Correct all misspellings in a stringconsole; // => "misspelling is misspelled"console; // => "Misspelling is Misspelled" (case-insensitive and preserves cases by default)console; // => "Mispelling is misspelled"console; // => "misspelling is misspelled" // RegExp to search misspellingsvar re = misspellings; // ...or...var re = misspellings "g"; console; // => ["mispelling", "mispelled"]
API
Build
$ npm install
$ npm run build
And Babel-translated source files go into lib
directory.
To update documents and dictionaries, run:
$ npm run update
Testing
$ npm test
Contributing
- Fork it!
- Create your feature branch:
git checkout -b my-new-feature
- Commit your changes:
git commit -am 'Add some feature'
- Push to the branch:
git push origin my-new-feature
- Submit a pull request :D
License
This software is licensed under GNU GPLv3. See LICENSE for full text of the license.
This software is using Wikipedia: Lists of common misspellings, which is licensed under Creative Commons Attribution-ShareAlike 3.0 Unported License, as a source of misspelling list.
The CC BY-SA 3.0 license says that the derived work also should be licensed under CC BY-SA. However, Creative Commons officially says it is not recommended to apply Creative Commons license to software.
Therefore, I decided to license this software under GPLv3 which is one-way compatible with CC BY-SA 4.0, and CC BY-SA 3.0 is compatible with CC BY-SA 4.0.