Create a command line dictionary tool using this api.
dict defn <word>
Display definitions of a word.
dict syn <word>
Display synonyms of a word.
dic ant <word>
Display antonyms of a word
dict ex <word>
Display examples of a word
dict <word>
Display all above details for a word
dict
Display all above details of word of the day
dict play
Command will display a definition, synonym, or antonym and ask the user to enter the word.
If correct word is entered, program should tell that the word is correct (Synonyms of the word should also be accepted as correct answer).
If incorrect word is entered, program should ask for
-
try again
Lets user enter word again
-
hint
Display a hint, and let user enter word again Hint can be
- Display the word randomly jumbled (cat -> atc).
- Display another definition of the word.
- Display another antonym of the word.
- Display another synonym of the word.
-
quit
Display the word, its full dict, and quit
How To Run
- The code is written in NodeJS.
- Pull this repo, and run
npm install
, this will install all the dependencies required. - Run
npm link
to install as a global command - Now type the any of the aforementioned command.