From 11fedacff412b4d5c00d084e8b7d9d2270896925 Mon Sep 17 00:00:00 2001 From: "(quasar) nebula" Date: Wed, 10 Apr 2024 19:19:00 -0300 Subject: wiki-data: is{Artist,Contributor,CoverArtist}Contribution Just some helper utilities. These carry a specific meaning which we'd like to associate with a particular word, rather than copy everywhere needed. --- src/util/wiki-data.js | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'src/util') diff --git a/src/util/wiki-data.js b/src/util/wiki-data.js index f8ab3ef3..8a2c44cd 100644 --- a/src/util/wiki-data.js +++ b/src/util/wiki-data.js @@ -271,6 +271,18 @@ export function getNewReleases(numReleases, {albumData}) { .slice(0, numReleases); } +export function isArtistContribution(contrib) { + return contrib.thingProperty === 'artistContribs'; +} + +export function isContributorContribution(contrib) { + return contrib.thingProperty === 'contributorContribs'; +} + +export function isCoverArtistContribution(contrib) { + return contrib.thingProperty === 'coverArtistContribs'; +} + // Carousel layout and utilities // Layout constants: -- cgit 1.3.0-6-gf8a5