js-azlyrics

0.2.4 • Public • Published

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}`);
});

Readme

Keywords

Package Sidebar

Install

npm i js-azlyrics

Weekly Downloads

1

Version

0.2.4

License

MIT

Unpacked Size

94.6 kB

Total Files

6

Last publish

Collaborators

  • benkaiser