Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@ccnokes/spellchecker

Package Overview
Dependencies
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@ccnokes/spellchecker

Bindings to native spellchecker

  • 4.0.5
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

SpellChecker Node Module

Build status Build Status

Native bindings to NSSpellChecker or the Windows 8 Spell Check API, depending on your platform.

Installing

npm install @ccnokes/spellchecker

Using

import { SpellChecker } from '@ccnokes/spellchecker'

SpellChecker.isMisspelled(word)

Check if a word is misspelled.

word - String word to check.

Returns true if the word is misspelled, false otherwise.

SpellChecker.getCorrectionsForMisspelling(word)

Get the corrections for a misspelled word.

word - String word to get corrections for.

Returns a non-null but possibly empty array of string corrections.

SpellChecker.checkSpelling(corpus)

Identify misspelled words in a corpus of text.

corpus - String corpus of text to spellcheck.

Returns an Array containing {start, end} objects that describe an index range within the original String that contains a misspelled word.

SpellChecker.checkSpellingAsync(corpus)

Asynchronously identify misspelled words.

corpus - String corpus of text to spellcheck.

Returns a Promise that resolves with the Array described by checkSpelling().

SpellChecker.add(word)

Adds a word to the dictionary. When using Hunspell, this will not modify the .dic file; new words must be added each time the spellchecker is created. Use a custom dictionary file.

word - String word to add.

Returns nothing.

SpellChecker.isSupported()

Tells if your platform is supported. If it's not, you can use the API as normal, just nothing will actually work.

Returns boolean.

FAQs

Package last updated on 01 May 2018

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc