spotify-url-info
Advanced tools
Comparing version 3.2.11 to 3.2.12
@@ -5,3 +5,3 @@ { | ||
"homepage": "https://github.com/microlinkhq/spotify-url-info", | ||
"version": "3.2.11", | ||
"version": "3.2.12", | ||
"main": "src/index.js", | ||
@@ -8,0 +8,0 @@ "author": { |
@@ -23,4 +23,6 @@ 'use strict' | ||
const throwError = message => { | ||
throw new TypeError(`${message}\n${ERROR.REPORT}`) | ||
const throwError = (message, html) => { | ||
const error = new TypeError(`${message}\n${ERROR.REPORT}`) | ||
error.html = html | ||
throw error | ||
} | ||
@@ -32,3 +34,3 @@ | ||
let scripts = embed.find(el => el.tagName === 'html') | ||
if (scripts === undefined) return throwError(ERROR.NOT_SCRIPTS) | ||
if (scripts === undefined) return throwError(ERROR.NOT_SCRIPTS, html) | ||
@@ -69,3 +71,3 @@ scripts = scripts.children | ||
return throwError(ERROR.NOT_DATA) | ||
return throwError(ERROR.NOT_DATA, html) | ||
} | ||
@@ -113,3 +115,4 @@ | ||
const getTracks = data => data.trackList ? data.trackList.map(toTrack) : [toTrack(data)] | ||
const getTracks = data => | ||
data.trackList ? data.trackList.map(toTrack) : [toTrack(data)] | ||
@@ -174,1 +177,2 @@ function getPreview (data) { | ||
module.exports.parseData = parseData | ||
module.exports.throwError = throwError |
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
12508
142