1.0.1 • Published 3 years ago

spellcheck-js v1.0.1

Weekly downloads
-
License
MIT
Repository
github
Last release
3 years ago

spellcheck-js

Checks if a english sentence or word is spelled correctly in JavaScript.

Installation

npm i spellcheck-js

Usage

First import:

const spellcheck = require("spellcheck-js");

Check if a word is spelled correctly:

spellcheck("hello"); // true
spellcheck("fsdklfjas"); // false

Or a sentence:

spellcheck("sentence correct"); // true
spellcheck("sentecees corecte"); // false

Get more advanced info:

spellcheck("which wordd wrong"); // {isSpelledCorrectly: false, correctlySpelledWords: ['which', 'wrong'], incorrectlySpelledWords: ['wordd']}

Or add your own words

spellcheck("customword"); // false
spellcheck("customword", false, ["customword"]); // true

License

spellcheck-js is MIT-licensed open-source software created by Bharadwaj Duggaraju.

1.0.1

3 years ago

1.0.0

3 years ago