∅:D[
3.541] → [
5.1457:1508]
B:BD[
6.12196] → [
5.1457:1508]
B:BD[
5.1508] → [
2.404:481]
join_name = name.split(/\s+/).sort().join('');
return [producer, brand, name.split(/\s+/).join(' ').trim(), join_name];
return [producer, brand, name.split(/\s+/).reduce((accumulator, modified_word) => {
for(let j = originalName.length - 1; j >= 0; --j) {
if(modified_word === originalName[j].replace(/"|-|−|'/g, '').toLowerCase()) {
accumulator.push(originalName[j]);
originalName.splice(j, 1);
break;
}
}
return accumulator;
}, []).join(' '), name.split(/\s+/).sort().join('')];