1 | ## Usage
|
2 |
|
3 | ### Default options
|
4 |
|
5 | ````javascript
|
6 | var autocorrect = require('autocorrect')()
|
7 | autocorrect('mbryo') // embryo
|
8 | ````
|
9 |
|
10 | ### Custom dictionary path
|
11 |
|
12 | ````javascript
|
13 | var path = '/usr/share/dict/words'
|
14 | var autocorrect = require('autocorrect')({dictionary: path})
|
15 | autocorrect('mbryo') // embryo
|
16 | ````
|
17 |
|
18 | ### Custom words
|
19 | ```` javascript
|
20 | var words = ['word', 'weird', 'wired']
|
21 | var autocorrect = require('autocorrect')({words: words})
|
22 | autocorrect('wared') // wired
|
23 | ````
|
24 |
|
25 | ## Options
|
26 |
|
27 | * `words` - a list of words to use for matching
|
28 | * `dictionary` - path to dictionary file
|
29 |
|
\ | No newline at end of file |