src/misspellings.js
function correctWordsFor(word, options = {}) {
  word = String(word || "");
  const found = (options.caseSensitive ?
    dict()[word] :
    dict({ lowerCase: true })[word.toLowerCase()]
  );
  return found ? found.split(",") : [];
}
function correctWordsFor(word, options = {}) {
  word = String(word || "");
  const found = (options.caseSensitive ?
    dict()[word] :
    dict({ lowerCase: true })[word.toLowerCase()]
  );
  return found ? found.split(",") : [];
}
function correctWordsFor ( word , options = { } ) { word = String ( word || "" ) ; const found = ( options . caseSensitive ? dict ( ) [ word ] : dict ( { lowerCase : true } ) [ word . toLowerCase ( ) ] ) ; return found ? found . split ( "," ) : [ ] ; }
Get correct words from misspelling.

It is case-insensitive by default.
Set `caseSensitive` to `true` if you need.

@param {string} word  Misspelled word.
@param {Object} options  Options.
@param {Boolean} [options.caseSensitive=false]
If `true`, do case-sensitive search.
@return {string[]}  An array of correct words.
If there are no correct words for `word`, returns an empty array.
Get correct words from misspelling .