weather-api-data
Advanced tools
Comparing version 1.0.0 to 1.0.1
{ | ||
"name": "weather-api-data", | ||
"version": "1.0.0", | ||
"description": "", | ||
"version": "1.0.1", | ||
"description": "NPM package that gets information about weather", | ||
"main": "index.js", | ||
@@ -6,0 +6,0 @@ "scripts": { |
11
test.js
@@ -1,3 +0,12 @@ | ||
const weather = require('./index.js') | ||
// using await | ||
const weather = require('weather-api-data'); | ||
async function getWeather() { | ||
const data = await weather.loction('manama'); | ||
console.log(data); | ||
} | ||
getWeather(); | ||
// using .then | ||
weather.loction('manama').then(weather => console.log(weather)); |
1152
22