genius-lyrics-api
Advanced tools
Comparing version 3.1.0 to 3.1.1
@@ -7,3 +7,3 @@ const axios = require('axios'); | ||
/** | ||
* @param {{apiKey: string, title: string, artist: string, optimizeQuery: boolean}} options | ||
* @param {{apiKey: string, title: string, artist: string, optimizeQuery: boolean, authHeader: boolean}} options | ||
*/ | ||
@@ -10,0 +10,0 @@ module.exports = async function (options) { |
const checkOptions = (options) => { | ||
let { apiKey, title, artist } = options; | ||
switch ('undefined') { | ||
case typeof apiKey: | ||
throw '"apiKey" property is missing from options'; | ||
case typeof title: | ||
throw '"title" property is missing from options'; | ||
case typeof artist: | ||
throw '"artist" property is missing from options'; | ||
default: | ||
break; | ||
if (!apiKey) { | ||
throw '"apiKey" property is missing from options'; | ||
} else if (!title) { | ||
throw '"title" property is missing from options'; | ||
} else if (!artist) { | ||
throw '"artist" property is missing from options'; | ||
} | ||
@@ -13,0 +10,0 @@ }; |
{ | ||
"name": "genius-lyrics-api", | ||
"version": "3.1.0", | ||
"version": "3.1.1", | ||
"main": "index.js", | ||
@@ -5,0 +5,0 @@ "author": { |
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
9871
167