const brands = [ | |
{ label: "Côte et Ciel", value: 1532 }, | |
{ label: "Études", value: 17 }, | |
{ label: "AllSaints", value: 2501 }, | |
{ label: "Samsøe & Samsøe", value: 1571 }, | |
{ label: "Ben Sherman", value: 2124 }, | |
{ label: "Drôle de Monsieur", value: 137 }, | |
{ label: "!Solid", value: 668 }, | |
]; | |
brands.filter(brand => { | |
const decomposedLabel = | |
brand.label.normalize('NFD').replace(/[\u0300-\u036f]/g, ''); | |
return decomposedLabel.indexOf("Cote") > -1; | |
}) | |
=> [ | |
{ label: "Côte et Ciel", value: 1532 }, | |
] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment