Skip to content

Commit

Permalink
undocument languiches
Browse files Browse the repository at this point in the history
  • Loading branch information
antimatter15 committed Oct 8, 2016
1 parent 1331ef8 commit 090d0c7
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,13 @@ class TesseractWorker {

recognize(image, options){
return this._delay(job => {
options = options || {}
options.lang = options.lang || 'eng';
if(typeof options === 'string'){
options = { lang: options };
}else{
options = options || {}
options.lang = options.lang || 'eng';
}

job._send('recognize', { image: image, options: options, workerOptions: this.workerOptions })
})
}
Expand Down

0 comments on commit 090d0c7

Please sign in to comment.