UNPKG

ultra-lyrics

Version:

Lyrics Fetcher

29 lines (28 loc) 748 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); /** * @internal * Class which parses the search results. */ class Parser { constructor(raw) { this.raw = raw; /** * Method which parses the search results. */ this.parse = () => { return this.raw.map(({ id, title, primary_artist, song_art_image_url, url }) => ({ id, url, title, image: song_art_image_url, artist: { id: primary_artist.id, name: primary_artist.name, url: primary_artist.url } })); }; } } exports.default = Parser;