« get me outta code hell

wiki-data: is{Artist,Contributor,CoverArtist}Contribution - hsmusic-wiki - HSMusic - static wiki software cataloguing collaborative creation
about summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
author(quasar) nebula <qznebula@protonmail.com>2024-04-10 19:19:00 -0300
committer(quasar) nebula <qznebula@protonmail.com>2024-06-12 17:26:46 -0300
commitd16f20aa14c65aef8dcd49ee56bae933b2487b13 (patch)
tree43c3c055601b7d2a29c5e70fa7af9c713bba7523 /src
parentbba5ac5134e6404cfe4e9dca2522fe79ec28f908 (diff)
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.
Diffstat (limited to 'src')
-rw-r--r--src/util/wiki-data.js12
1 files changed, 12 insertions, 0 deletions
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: