js-azlyrics

Gets the lyrics, title, and author off of what song you provide.

Usage no npm install needed!

<script type="module">
  import jsAzlyrics from 'https://cdn.skypack.dev/js-azlyrics';
</script>

README

js-azlyrics

NPM

This uses azlyrics and gets the song of your choice and returns a promise with song lyrics, title, and song.

This is intended for browser usage and depends on fetch. You can add a polyfill if you don't have it.

Usage:

import azlyrics from 'js-azlyrics';

// optional, used for your own CORS proxy endpoint
const options = {
  searchEndpoint: '/azlyricssearch',
  mainEndpoint: '/azlyrics'
};

azlyrics.get('Allday You Always Know The DJ', options).then((song) => {
   console.log(`Lyrics for ${song.song} by ${song.artist}:\n${song.lyrics}`);
});