Cool. Just a remark:
if (nameOsc.includes ("slot")) {
nameOsc = "empty";
} else {
return nameOsc;
}
only returns a label when the condition is not met, what you intended to write was most likely
if (nameOsc.includes ("slot")) {
nameOsc = "empty";
}
return nameOsc;