genius-lyrics-ts
Advanced tools
Comparing version 0.0.10 to 0.0.11
@@ -52,3 +52,3 @@ "use strict"; | ||
const html = await response.text(); | ||
const htmlDocument = typeof window != "undefined" && window.document ? new import_jsdom.JSDOM(html).window.document : new DOMParser().parseFromString(html, "text/html"); | ||
const htmlDocument = typeof window != "undefined" && window.document ? new DOMParser().parseFromString(html, "text/html") : new import_jsdom.JSDOM(html).window.document; | ||
let lyrics = htmlDocument.querySelector('div[class="lyrics"]')?.textContent?.trim(); | ||
@@ -55,0 +55,0 @@ if (!lyrics) { |
{ | ||
"name": "genius-lyrics-ts", | ||
"version": "0.0.10", | ||
"version": "0.0.11", | ||
"description": "Get lyrics from genius with Typescript, Javascript, or Node", | ||
@@ -5,0 +5,0 @@ "main": "dist/index.js", |
@@ -11,4 +11,4 @@ import { JSDOM } from "jsdom"; | ||
typeof window != "undefined" && window.document | ||
? new JSDOM(html).window.document | ||
: new DOMParser().parseFromString(html, "text/html"); | ||
? new DOMParser().parseFromString(html, "text/html") | ||
: new JSDOM(html).window.document; | ||
@@ -15,0 +15,0 @@ let lyrics = htmlDocument |
Sorry, the diff of this file is not supported yet
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