{"_id":"@builtbygio/spellchecker","name":"@builtbygio/spellchecker","dist-tags":{"latest":"3.7.1"},"versions":{"3.7.1":{"main":"./lib/spellchecker.js","name":"@builtbygio/spellchecker","description":"Bindings to native spellchecker","version":"3.7.1","license":"MIT","repository":{"type":"git","url":"git+https://github.com/builtbygio/node-spellchecker.git"},"bugs":{"url":"https://github.com/builtbygio/node-spellchecker/issues"},"homepage":"https://github.com/builtbygio/node-spellchecker","scripts":{"test":"jasmine-focused --captureExceptions --coffee spec/","install":"node-gyp rebuild"},"devDependencies":{"jasmine-focused":"^1.0.7"},"dependencies":{"any-promise":"^1.3.0","nan":"2.28.0"},"engines":{"chevron":"*"},"gypfile":true,"_id":"@builtbygio/spellchecker@3.7.1","_nodeVersion":"24.18.0","_npmVersion":"11.16.0","dist":{"integrity":"sha512-/aMcqq8TNPHoM4bxbwwzHmkdA8GJgj2XbI7AMq+Hohn5zeUM9ANgLism/KYsY97/TnQTJPd5sitJBQUneMqPCw==","shasum":"874b65789dddf09e37f2676aed5eac27f52eacfa","tarball":"https://registry.npmjs.org/@builtbygio/spellchecker/-/spellchecker-3.7.1.tgz","fileCount":78,"unpackedSize":2046101,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEQCIFcXQE0IMBJqwl0G0xQRqLZ1oFilohZJ4/rVJhAIo5VtAiB8IPPosT5bB/S4AYcsqjRJN7FOMcRJjfAcd7K93AFLhQ=="}]},"_npmUser":{"name":"giobuilds","email":"giova19@proton.me"},"directories":{},"maintainers":[{"name":"giobuilds","email":"giova19@proton.me"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/spellchecker_3.7.1_1787781671142_0.5571807977410552"},"_hasShrinkwrap":false}},"time":{"created":"2026-08-26T22:01:10.875Z","3.7.1":"2026-08-26T22:01:11.310Z","modified":"2026-08-26T22:01:11.643Z"},"maintainers":[{"name":"giobuilds","email":"giova19@proton.me"}],"description":"Bindings to native spellchecker","homepage":"https://github.com/builtbygio/node-spellchecker","repository":{"type":"git","url":"git+https://github.com/builtbygio/node-spellchecker.git"},"bugs":{"url":"https://github.com/builtbygio/node-spellchecker/issues"},"license":"MIT","readme":"# SpellChecker Node Module [![Build Status](https://travis-ci.org/atom/node-spellchecker.svg?branch=master)](https://travis-ci.org/atom/node-spellchecker) [![Build status](https://ci.appveyor.com/api/projects/status/up294b734wagwlaw/branch/master?svg=true)](https://ci.appveyor.com/project/kevinsawicki/node-spellchecker/branch/master)\n\nNative bindings to [NSSpellChecker](https://developer.apple.com/library/mac/#documentation/cocoa/reference/ApplicationKit/Classes/NSSpellChecker_Class/Reference/Reference.html), [Hunspell](http://hunspell.sourceforge.net/), or the [Windows 8 Spell Check API](https://msdn.microsoft.com/en-us/library/windows/desktop/hh869853(v=vs.85).aspx), depending on your platform. Windows 7 and below as well as Linux will rely on Hunspell.\n\n## Installing\n\n```bash\nnpm install spellchecker\n```\n\n## Using\n\n```coffeescript\nSpellChecker = require 'spellchecker'\n```\n\n### SpellChecker.isMisspelled(word)\n\nCheck if a word is misspelled.\n\n`word` - String word to check.\n\nReturns `true` if the word is misspelled, `false` otherwise.\n\n### SpellChecker.getCorrectionsForMisspelling(word)\n\nGet the corrections for a misspelled word.\n\n`word` - String word to get corrections for.\n\nReturns a non-null but possibly empty array of string corrections.\n\n### SpellChecker.checkSpelling(corpus)\n\nIdentify misspelled words in a corpus of text.\n\n`corpus` - String corpus of text to spellcheck.\n\nReturns an Array containing `{start, end}` objects that describe an index range within the original String that contains a misspelled word.\n\n### SpellChecker.checkSpellingAsync(corpus)\n\nAsynchronously identify misspelled words.\n\n`corpus` - String corpus of text to spellcheck.\n\nReturns a Promise that resolves with the Array described by `checkSpelling()`.\n\n### SpellChecker.add(word)\n\nAdds a word to the dictionary.\nWhen 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.\n\n`word` - String word to add.\n\nReturns nothing.\n\n### new Spellchecker()\n\nIn addition to the above functions that are used on a default instance, a new instance of SpellChecker can be instantiated with the use of the `new` operator. The same methods are available with the instance but the dictionary and underlying API can be changed independently from the default instance.\n\n```javascript\nconst checker = new SpellChecker.Spellchecker()\n```\n\n#### SpellChecker.Spellchecker.setSpellcheckerType(type)\n\nOverrides the library selection for checking. Without this, the checker will use [Hunspell](http://hunspell.github.io/) on Linux, the [Spell Checking API](https://docs.microsoft.com/en-us/windows/desktop/intl/spell-checker-api) for Windows, and [NSSpellChecker](https://developer.apple.com/documentation/appkit/nsspellchecker) on Macs.\n\nIf the environment variable `SPELLCHECKER_PREFER_HUNSPELL` is set to any value, the library will fallback to always using the Hunspell implementation.\n\nThis is the same behavior as calling `setSpellcheckerType` with the `USE_SYSTEM_DEFAULTS` constant:\n\n```coffeescript\nchecker = new SpellChecker.Spellchecker\nchecker.setSpellcheckerType SpellChecker.USE_SYSTEM_DEFAULTS\n```\n\nTo always use the system API and not fallback to Hunspell regardless of the environment variable, use the `ALWAYS_USE_SYSTEM` constant:\n\n```coffeescript\nchecker = new SpellChecker.Spellchecker\nchecker.setSpellcheckerType SpellChecker.ALWAYS_USE_SYSTEM\n```\n\nLikewise, Hunspell can be forced with the `ALWAYS_USE_HUNSPELL` constant.\n\n```javascript\nconst checker = new SpellChecker.Spellchecker();\nchecker.setSpellcheckerType(SpellChecker.ALWAYS_USE_SYSTEM);\n```\n\nOn Linux, Hunspell is always used regardless of the setting. This method must also be called before any spelling is done otherwise it will throw an error.\n\nThis returns nothing.\n","readmeFilename":"README.md","_rev":"1-1baa73cd01fbe7dab407f97f1bd6ff0d"}