{"action":"created","issue":{"url":"https://api.github.com/repos/atom/node-spellchecker/issues/6","labels_url":"https://api.github.com/repos/atom/node-spellchecker/issues/6/labels{/name}","comments_url":"https://api.github.com/repos/atom/node-spellchecker/issues/6/comments","events_url":"https://api.github.com/repos/atom/node-spellchecker/issues/6/events","html_url":"https://github.com/atom/node-spellchecker/pull/6","id":57381331,"number":6,"title":"Initial support for v2 API","user":{"login":"paulcbetts","id":1396,"avatar_url":"https://avatars.githubusercontent.com/u/1396?v=3","gravatar_id":"","url":"https://api.github.com/users/paulcbetts","html_url":"https://github.com/paulcbetts","followers_url":"https://api.github.com/users/paulcbetts/followers","following_url":"https://api.github.com/users/paulcbetts/following{/other_user}","gists_url":"https://api.github.com/users/paulcbetts/gists{/gist_id}","starred_url":"https://api.github.com/users/paulcbetts/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/paulcbetts/subscriptions","organizations_url":"https://api.github.com/users/paulcbetts/orgs","repos_url":"https://api.github.com/users/paulcbetts/repos","events_url":"https://api.github.com/users/paulcbetts/events{/privacy}","received_events_url":"https://api.github.com/users/paulcbetts/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-02-11T21:38:58Z","updated_at":"2015-02-20T14:32:43Z","closed_at":"2015-02-12T01:10:44Z","pull_request":{"url":"https://api.github.com/repos/atom/node-spellchecker/pulls/6","html_url":"https://github.com/atom/node-spellchecker/pull/6","diff_url":"https://github.com/atom/node-spellchecker/pull/6.diff","patch_url":"https://github.com/atom/node-spellchecker/pull/6.patch"},"body":"node-spellchecker has a number of deficiencies that this PR starts to fix up:\r\n\r\n* Dictionary is hard-coded to en_US on Windows\r\n* Dictionaries are hard-coded to the vendor directory, which fails on ASAR because Hunspell can't load it out of an ASAR archive\r\n* These settings are globals, so having >1 language active is impossible (i.e. if you detect the user switched their keyboard layout to Spanish, you couldn't blow away the old Hunspell)\r\n\r\nTo fix this, this PR introduces a new class:\r\n\r\n#### Spellchecker\r\n\r\n* `setDictionary(language, dictionaryPath)` - This method must be called before any other method is called, it configures the language (`en_US`) and the path to the dictionary (optional, default is `.`)\r\n\r\n* `isMisspelled` - Identical to v1 `isMisspelled` method, returns a `bool` marking whether a word is misspelled\r\n\r\n* `getCorrectionsForMisspelling` - Identical to v1 `getCorrectionsForMisspelling` method, returns a list of corrections for a misspelled word.\r\n\r\nThis PR also maintains compatibility with the v1 API via creating a default `Spellchecker` when the original methods are called"},"comment":{"url":"https://api.github.com/repos/atom/node-spellchecker/issues/comments/75246559","html_url":"https://github.com/atom/node-spellchecker/pull/6#issuecomment-75246559","issue_url":"https://api.github.com/repos/atom/node-spellchecker/issues/6","id":75246559,"user":{"login":"cristianfraser","id":4886177,"avatar_url":"https://avatars.githubusercontent.com/u/4886177?v=3","gravatar_id":"","url":"https://api.github.com/users/cristianfraser","html_url":"https://github.com/cristianfraser","followers_url":"https://api.github.com/users/cristianfraser/followers","following_url":"https://api.github.com/users/cristianfraser/following{/other_user}","gists_url":"https://api.github.com/users/cristianfraser/gists{/gist_id}","starred_url":"https://api.github.com/users/cristianfraser/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cristianfraser/subscriptions","organizations_url":"https://api.github.com/users/cristianfraser/orgs","repos_url":"https://api.github.com/users/cristianfraser/repos","events_url":"https://api.github.com/users/cristianfraser/events{/privacy}","received_events_url":"https://api.github.com/users/cristianfraser/received_events","type":"User","site_admin":false},"created_at":"2015-02-20T14:32:43Z","updated_at":"2015-02-20T14:32:43Z","body":"I'm sorry, but how do I use the `setDictionary()` method? Doing `c = require('spellchecker'); c.setDictionary` returns `undefined`, I don't know if I'm missing something or not.\r\n\r\n@paulcbetts @zcbenz "}}