In this lab we are going to learn some open source tooling.
So the first step is to read the instruntions! If you, dear reader, want to practice with me please go ahead and take a look here: https://github.com/humphd/Seneca2017LearningLab
The next step is to create a new repo and clone to the local machine. These steps are really easy, and are amazingly explained in the instructions by Mr. Humphry. So I am just going to move on to the next step.
Initialize a new Node.js Module
This part was not tricky for me, since I am a linux user, so let’s just move on to the next part.
Create your Node.js Module in seneca.js
So I created a seneca.js file. I put the code provided for us, and that’s how it looks now.
The next step is to implement those two functions. Which shouldn’t be hard.
First we need to implement isValidEmail, which basically validates if the provided email is a valid seneca email address. In order to do that, I am going to use regular expression. The second function returns a formatted Seneca email address.
Add ESLint to avoid common patterns and bugs
npm install eslint --save-dev