yargs
In this section, we will use yargs, a third-party npm module, to make the process of parsing much easier. It will let us access things such as title and body information without needing to write a manual parser. This is a great example of when you should look for an npm module. If we don't use a module, it would be more productive for our Node application to use a third-party module that has been tested and thoroughly vetted.
To get started, we'll install the module, then we'll add it into the project, parsing for things such as a title of the body, and we'll call all the functions that will get defined over in notes.js
. If the command is add
, we'll call add note
, so on.
Installing yargs
Now, let's view the documents page for yargs. It's always a good idea to know what you're getting yourself into. If you search for yargs
on Google, you should find the GitHub page as your first search result. As shown in the following screenshot, we have the GitHub page for the yargs library:

Now, yargs...