This npm package display the weather and location (latitutde and longitude) of city.
This is a Node.js module available through the npm registry. Installation is done using the npm install command:
$ npm install weather-stats
Require the weather-stats module in the file, using this statement:
const getWeather = require("weather-stats");
After requiring weather-stats, call the function and pass the city name as a string parameter.
getWeather("delhi");
Now, run the code and see the result in the form of JSON.