![Create React App Officially Deprecated Amid React 19 Compatibility Issues](https://cdn.sanity.io/images/cgdhsj6q/production/04fa08cf844d798abc0e1a6391c129363cc7e2ab-1024x1024.webp?w=400&fit=max&auto=format)
Security News
Create React App Officially Deprecated Amid React 19 Compatibility Issues
Create React App is officially deprecated due to React 19 issues and lack of maintenance—developers should switch to Vite or other modern alternatives.
A JavaScript package that leverages [Genius API](https://genius.com/developers) to search and fetch song lyrics and album art.It doesn't use any native node dependencies and therefore, can be used on the client-side.
A JavaScript package that leverages Genius API to search and fetch song lyrics and album art.
It doesn't use any native node dependencies and therefore, can be used on the client-side.
Install with npm
npm install --save genius-lyrics-api
Or install with Yarn
yarn add genius-lyrics-api
Get the Genius Developer Access Token
import { getLyrics, getSong } from 'genius-lyrics-api';
const options = {
apiKey: 'XXXXXXXXXXXXXXXXXXXXXXX',
title: 'Blinding Lights',
artist: 'The Weeknd',
optimizeQuery: true
};
getLyrics(options).then((lyrics) => console.log(lyrics));
getSong(options).then((song) =>
console.log(`
${song.id}
${song.title}
${song.url}
${song.albumArt}
${song.lyrics}`)
);
:warning: You may get a CORS block error while testing on localhost. To bypass this, you need to disable Same-Origin Policy in your browser. You may follow the instructions here.
type options {
title: string;
artist: string;
apiKey: string; // Genius developer access token
optimizeQuery?: boolean; // Setting this to true will optimize the query for best results
authHeader?: boolean; // Whether to include auth header in the search request. 'false' by default.
}
🚨 All properties in the options object are required except optimizeQuery
and authHeader
. If title
or artist
is unknown, pass an empty string.
type song {
id: number; // Genius song id
title: string; // Song title
url: string; // Genius webpage URL for the song
lyrics: string; // Song lyrics
albumArt: string; // URL of the album art image (jpg/png)
}
type searchResult {
id: number; // Genius song id
url: string; // Genius webpage URL for the song
title: string; // Song title
albumArt: string; // URL of the album art image (jpg/png)
}
genius-lyrics-api exposes the following methods:
getLyrics(options | url)
Accepts options or the url to a Genius song.
Returns a promise that resolves to a string containing lyrics. Returns null
if no lyrics are found.
getAlbumArt(options)
Accepts an options object.
Returns a promise that resolves to a url (string) to the song's album art. Returns null
if no url is found.
getSong(options)
Accepts an options object.
Returns a promise that resolves to an object of type song. Returns null
if song is not found.
searchSong(options)
Accepts an options object.
Returns a promise that resolves to an array of type searchResult. Returns null
if no matches are found.
getSongById(id: (number | string))
Accepts a valid Genius song ID. IDs can be found using the searchSong
method.
Returns a promise that resolves to an object of type song.
If you find this package useful, hit that sweet sweet ⭐️ button.
FAQs
A JavaScript package that leverages [Genius API](https://genius.com/developers) to search and fetch song lyrics and album art.It doesn't use any native node dependencies and therefore, can be used on the client-side.
The npm package gnus_xyz receives a total of 0 weekly downloads. As such, gnus_xyz popularity was classified as not popular.
We found that gnus_xyz demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Create React App is officially deprecated due to React 19 issues and lack of maintenance—developers should switch to Vite or other modern alternatives.
Security News
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
Security News
The Linux Foundation is warning open source developers that compliance with global sanctions is mandatory, highlighting legal risks and restrictions on contributions.