genius-lyrics-ts
Advanced tools
Comparing version 0.0.30 to 0.1.0
@@ -109,3 +109,3 @@ "use strict"; | ||
// src/index.ts | ||
// src/getLyrics.ts | ||
async function getLyrics(arg) { | ||
@@ -123,2 +123,5 @@ try { | ||
} | ||
var src_default = getLyrics; | ||
var getLyrics_default = getLyrics; | ||
// src/index.ts | ||
var src_default = getLyrics_default; |
{ | ||
"name": "genius-lyrics-ts", | ||
"version": "0.0.30", | ||
"version": "0.1.0", | ||
"description": "Get lyrics from genius with Typescript, Javascript, or Node", | ||
@@ -5,0 +5,0 @@ "main": "dist/index.js", |
@@ -1,21 +0,3 @@ | ||
import { Options, checkOptions } from "./utils"; | ||
import extractsLyrics from "./utils/extractsLyrics"; | ||
import searchSong from "./utils/searchSong"; | ||
import getLyrics from "./getLyrics"; | ||
/** | ||
* @param {({apiKey: string, title: string, artist: string, optimizeQuery: boolean}|string)} arg - options object, or Genius URL | ||
*/ | ||
async function getLyrics(arg: Options) { | ||
try { | ||
checkOptions(arg); | ||
let result = await searchSong(arg); | ||
if (!result) return null; | ||
let lyrics = await extractsLyrics(result.url); | ||
return lyrics; | ||
} catch (e) { | ||
throw e; | ||
} | ||
} | ||
export default getLyrics; |
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
15755
16
373