vue-weather-widget
Advanced tools
Comparing version 4.3.0 to 4.3.1
{ | ||
"name": "vue-weather-widget", | ||
"version": "4.3.0", | ||
"version": "4.3.1", | ||
"description": "Weather forecast widget for Vuejs using DarkSky api", | ||
@@ -5,0 +5,0 @@ "exportName": "vue-weather-widget", |
@@ -27,3 +27,3 @@ import jsonp from "jsonp"; | ||
const utils = { | ||
lookupIP() { | ||
lookupIP: () => { | ||
let cache = localStorage[IP_CACHE] || "{}"; | ||
@@ -53,3 +53,3 @@ cache = JSON.parse(cache); | ||
fetchLocationByIP(apiKey, ip) { | ||
fetchLocationByIP: (apiKey, ip) => { | ||
if (!ip) { | ||
@@ -78,3 +78,3 @@ return utils.lookupIP().then((data) => { | ||
geocode(apiKey, query, reversed = false) { | ||
geocode: (apiKey, query, reversed = false) => { | ||
let cache = localStorage[GEOCODE_CACHE] || "{}"; | ||
@@ -101,7 +101,7 @@ cache = JSON.parse(cache); | ||
reverseGeocode(apiKey, lat, lng) { | ||
reverseGeocode: (apiKey, lat, lng) => { | ||
return utils.geocode(apiKey, `${lat},${lng}`, true); | ||
}, | ||
fetchWeather(opts) { | ||
fetchWeather: (opts) => { | ||
opts = opts || {}; | ||
@@ -131,3 +131,3 @@ opts.units = opts.units || "us"; | ||
fetchOWMWeather(opts = {}) { | ||
fetchOWMWeather: (opts = {}) => { | ||
opts.units = opts.units || "auto"; | ||
@@ -152,3 +152,3 @@ opts.language = opts.language || "en"; | ||
mapData(data) { | ||
mapData: (data) => { | ||
const { current } = data; | ||
@@ -188,3 +188,3 @@ const { weather } = current; | ||
mapIcon(code) { | ||
mapIcon: (code) => { | ||
return Object.keys(ICON_MAPPINGS).find((key) => { | ||
@@ -191,0 +191,0 @@ return ICON_MAPPINGS[key].includes(code); |
36905