Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -202,13 +202,13 @@ This is your character encoding. Default value is `"UTF-8"`. You can also selec
#####"mirror" option
Select the default mirror to which japaneasy sends requests. The default value is `"usa"`. Other values include:
`"sweden"`
`"japan"`
`"germany"`
`"canada"`
`"austrailia"`
`"australia_monash"`
`"australia_melbourne"`

#####"timeout" option
If a request to a certain has not resolved the promise object within the time specified here, japaneasy will query a different mirror. WWWJDIC mirrors occasionally go down (at the time of this writing, the Austrailia mirror is down), but it's very infrequent that all five are down at the same time.
If a request to a certain has not resolved the promise object within the time specified here, japaneasy will query a different mirror. WWWJDIC mirrors occasionally go down, but it's very infrequent that all five are down at the same time.
Default value is `500` (milliseconds), which is long enough to not query multiple mirrors and short enough to not notice the delay if you switch over. If you're consistently seeing long load times, try changing the default mirror.

#####"custom" option
Expand Down
6 changes: 3 additions & 3 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -87,10 +87,10 @@ var dic = function (config) {

function mapMirror(key) {
var map = {
"austrailia": "http://www.csse.monash.edu.au/~jwb/cgi-bin/wwwjdic?",
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You update the map but you don't update the row above with the correct keys. On my repo I pulled these out and made this map a const and replaced the row above with map.keys() to keep them forever in sync

"canada": "http://www.ottix.net/cgi-bin/wwwjdic/wwwjdic?",
"austrailia": "http://nihongo.monash.edu/cgi-bin/wwwjdic?",
"australia_monash": "http://nihongo.monash.edu/cgi-bin/wwwjdic?",
"australia_melbourne": "http://nlp.cis.unimelb.edu.au/jwb/wwwjdic/wwwjdic.cgi?",
"germany": "http://wwwjdic.biz/cgi-bin/wwwjdic?",
"japan": "http://gengo.com/wwwjdic/cgi-data/wwwjdic?",
"usa": "http://www.edrdg.org/cgi-bin/wwwjdic/wwwjdic?",
"sweden": "http://wwwjdic.se/cgi-bin/wwwjdic?"
}
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "japaneasy",
"description": "API for the WWWJDICT project",
"author": "Rewon Child <rewonc@gmail.com> (https://github.com/rewonc)",
"version": "0.2.2",
"version": "0.3.0",
"main": "index.js",
"scripts": {
"test": "mocha"
Expand Down