chore: post
This commit is contained in:
parent
03b4538f07
commit
e21b37c306
3 changed files with 311 additions and 22 deletions
|
@ -3,16 +3,7 @@ import mbidPatches from '../json/mbid-patches.js';
|
|||
|
||||
export const artistCapitalization = (artist) => artistCapitalizationPatches[artist?.toLowerCase()] || artist
|
||||
|
||||
export const sanitizeMediaString = (string) => {
|
||||
const normalizedStr = string.normalize('NFD');
|
||||
return normalizedStr
|
||||
.replace(/[\u0300-\u036f]/g, '')
|
||||
.replace(/[\u2010]/g, '-')
|
||||
.replace(/—/g, '-')
|
||||
.replace(/\.{3}/g, '')
|
||||
.replace(/\?/g, '')
|
||||
.replace(/[\(\)\[\]\{\}]/g, '')
|
||||
}
|
||||
const sanitizeMediaString = (string) => string.normalize('NFD').replace(/[\u0300-\u036f\u2010—\.\?\(\)\[\]\{\}]/g, '').replace(/\.{3}/g, '');
|
||||
|
||||
export const mbidMap = (artist) => mbidPatches[artist.toLowerCase()] || ''
|
||||
|
||||
|
|
Reference in a new issue