export const PLAYLIST_CREATION_SUBSCRIPTION_MESSAGE = 'La création de playlist est réservée aux abonnés.' export const canCreatePlaylist = (hasActiveSubscription = false) => hasActiveSubscription === true export const assertCanCreatePlaylist = (hasActiveSubscription = false) => { if (!canCreatePlaylist(hasActiveSubscription)) { throw new Error(PLAYLIST_CREATION_SUBSCRIPTION_MESSAGE) } }