src/api.js
// Get the artist of a specific album.
Get the artist of a specific album.
Get the artist of a specific album .
function extractArtistDetails({ type, artists }) {
  if (type === 'album') {
    return { artist: artists[0].name };
  }
  return {};
}
function extractArtistDetails ( { type , artists } ) { if ( type === 'album' ) { return { artist : artists [ 0 ] . name } ; } return { } ; }
Get the artist of a specific album.
Get the artist of a specific album .