readline-sync package, write a program that allows a user to create their own dictionary.
When the program starts, a menu should display asking the user which of the following they would like to do:
- Insert a word and its definition
- Look up an existing word's definition
dictionary object, where the properties are the words and the values are the definitions.
Completing this will require the use of object square bracket notation, which you can learn more about from the MDN page on Working With Objects
- Create a menu system with
readline-syncthat loops forever until a user chooses the "Quit" option
- Create 2 functions to complete the first 2 options from the menu (
For unit testing reasons, both of these functions will take the dictionary object as a parameter. Check the repository starter code for the stubbed functions.
- Do not allow duplicate words to be saved (not case sensitive).
- Keep the user in the main loop (send them back to the menu after each action is complete) until they choose the "Quit" option
- Create a function that lists all of the words contained within the object.
- Create a function that lists words beginning with a given letter.
- Do not allow plural forms of existing words to be saved.
- For simplicity, you can just check for the "s" at the end instead of worrying about other forms of plural ("-ies", "-es", etc.)