Socket
Socket
Sign inDemoInstall

dark-sky-api

Package Overview
Dependencies
13
Maintainers
1
Versions
36
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 0.2.1 to 0.3.0

2

package.json
{
"name": "dark-sky-api",
"version": "0.2.1",
"version": "0.3.0",
"description": "a simple and robust dark sky api service for client-side js",

@@ -5,0 +5,0 @@ "main": "index.js",

@@ -100,9 +100,3 @@ import darkSkySkeleton from 'dark-sky-skeleton';

.get()
.then(({ currently }) => {
currently.windDirection = degreeToCardinal(currently.windBearing);
if (currently.nearestStormBearing) {
currently.nearestStormDirection = degreeToCardinal(currently.nearestStormBearing);
}
return currently;
});
.then(({ currently }) => this.processWeatherItem(currently));
}

@@ -123,5 +117,17 @@

.get()
.then(({ daily }) => daily);
.then(({ daily }) => {
daily.data = daily.data.map(item => this.processWeatherItem(item));
return daily;
});
}
processWeatherItem(item) {
item.windDirection = degreeToCardinal(item.windBearing);
if (item.nearestStormBearing) {
item.nearestStormDirection = degreeToCardinal(item.nearestStormBearing);
}
item.dateTime = moment.unix(item.time);
return item;
}
/**

@@ -128,0 +134,0 @@ * Get units object showing units returned based on configured units

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc