Socket
Socket
Sign inDemoInstall

genius-lyrics-ts

Package Overview
Dependencies
18
Maintainers
1
Versions
36
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 0.2.1 to 0.2.2

11

dist/index.js

@@ -32,8 +32,3 @@ "use strict";

var getTitle = (title, artist) => {
const validateTitle = title ?? "";
const validateArtist = artist ?? "";
if (validateTitle === "" && validateArtist === "") {
return "";
}
return `${validateTitle} ${validateArtist}`.toLowerCase().replace(/ *\([^)]*\) */g, "").replace(/ *\[[^\]]*]/, "").replace(/feat.|ft./g, "").replace(/\s+/g, " ").trim();
return `${title} ${artist}`.toLowerCase().replace(/ *\([^)]*\) */g, "").replace(/ *\[[^\]]*]/, "").replace(/feat.|ft./g, "").replace(/\s+/g, " ").trim();
};

@@ -47,5 +42,3 @@

const song = optimizeQuery ? getTitle(title, artist) : `${title} ${artist}`;
const reqUrl = `${searchUrl}${encodeURIComponent(
(song + " lyrics").trim()
)}`;
const reqUrl = `${searchUrl}${encodeURIComponent(song + " lyrics")}`;
const response = await fetch(reqUrl);

@@ -52,0 +45,0 @@ const html = await response.text();

2

package.json
{
"name": "genius-lyrics-ts",
"version": "0.2.1",
"version": "0.2.2",
"description": "Get lyrics from google with Typescript, Javascript, or Node",

@@ -5,0 +5,0 @@ "main": "dist/index.js",

@@ -0,0 +0,0 @@ # genius-lyrics-ts

@@ -15,5 +15,3 @@ import { parse } from "node-html-parser";

const song = optimizeQuery ? getTitle(title, artist) : `${title} ${artist}`;
const reqUrl = `${searchUrl}${encodeURIComponent(
(song + " lyrics").trim()
)}`;
const reqUrl = `${searchUrl}${encodeURIComponent(song + " lyrics")}`;

@@ -20,0 +18,0 @@ const response = await fetch(reqUrl);

import getLyrics from "./getLyrics";
export default getLyrics;

@@ -1,8 +0,3 @@

export const getTitle = (title?: string, artist?: string) => {
const validateTitle = title ?? "";
const validateArtist = artist ?? "";
if (validateTitle === "" && validateArtist === "") {
return "";
}
return `${validateTitle} ${validateArtist}`
export const getTitle = (title: string, artist?: string) => {
return `${title} ${artist}`
.toLowerCase()

@@ -9,0 +4,0 @@ .replace(/ *\([^)]*\) */g, "")

@@ -0,0 +0,0 @@ {

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc