Initialization
To initialize phishing-api you need to use a constructor. Learn more about them here
Why a constructor?
The constructor checks if the API is online to avoid any future headaches.
Actual steps
- Import the package
const PhishingAPI = require("phishing-api")
- Create a variable (or constant) with the imported PhishingAPI class
const PhishingAPI = require("phishing-api")
let phish = new PhishingAPI()
Now you're done, hooray!