twitch-api-lite
Advanced tools
Comparing version 0.0.5 to 0.0.6
30
index.js
@@ -26,3 +26,11 @@ const request = require("request"); | ||
{ | ||
fulfill(JSON.parse(body).data.length !== 0) | ||
let bodyJson = JSON.parse(body); | ||
if(bodyJson !== undefined && bodyJson.data !== undefined && bodyJson.data.length !== 0) | ||
{ | ||
fulfill(true) | ||
} | ||
else | ||
{ | ||
fulfill(false) | ||
} | ||
}) | ||
@@ -59,3 +67,11 @@ } | ||
{ | ||
fulfill(JSON.parse(body).data) | ||
let bodyJson = JSON.parse(body); | ||
if(bodyJson !== undefined && bodyJson.data !== undefined) | ||
{ | ||
fulfill(bodyJson.data) | ||
} | ||
else | ||
{ | ||
fulfill([]) | ||
} | ||
}) | ||
@@ -92,3 +108,11 @@ } | ||
{ | ||
fulfill(JSON.parse(body).data) | ||
let bodyJson = JSON.parse(body); | ||
if(bodyJson !== undefined && bodyJson.data !== undefined) | ||
{ | ||
fulfill(bodyJson.data) | ||
} | ||
else | ||
{ | ||
fulfill([]) | ||
} | ||
}) | ||
@@ -95,0 +119,0 @@ } |
{ | ||
"name": "twitch-api-lite", | ||
"version": "0.0.5", | ||
"version": "0.0.6", | ||
"description": "This package provides small lightweight functions that are to be used with the Twitch API v5", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
41020
118