« 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-18 22:56:04 -0300
commit11fedacff412b4d5c00d084e8b7d9d2270896925 (patch)
treeefbac4d1a47b0a07dccdcff83d489ad50d0edd5c /src
parentc089a5651840c9927e2e6f50f527cca248346d15 (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: