New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

dark-sky

Package Overview
Dependencies
Maintainers
1
Versions
12
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

dark-sky - npm Package Compare versions

Comparing version

to
1.1.5

10

dark-sky-api.js

@@ -13,2 +13,3 @@ const req = require("request")

this.timeoutVal = 20000
this.gzip = false
}

@@ -20,2 +21,9 @@

compression(val) {
if (DarkSky.truthyOrZero(val)) {
this.gzip = val
}
return this
}
longitude(long) {

@@ -140,3 +148,3 @@ if (DarkSky.truthyOrZero(long)) {

req(
{ url: this.url, json: true, timeout: this.timeoutVal },
{ url: this.url, json: true, timeout: this.timeoutVal, gzip: this.gzip },
(err, res, body) => {

@@ -143,0 +151,0 @@ if (err) {

@@ -42,1 +42,14 @@ const DarkSky = require("./dark-sky-api")

})
test("return the current forecast for Toronto using compression", async () => {
const darksky = new DarkSky(process.env.DARK_SKY)
const result = await darksky
.coordinates({
lat: 43.761539,
lng: -79.411079
})
.compression(true)
.get()
expect(result.latitude).toBe(43.761539)
expect(result.longitude).toBe(-79.411079)
})

2

package.json
{
"name": "dark-sky",
"version": "1.1.4",
"version": "1.1.5",
"description":

@@ -5,0 +5,0 @@ "A dead simple Dark Sky API wrapper for Nodejs using method chaining and promises.",