-
-
Save paulspringett/819280065ac76ace352dfcac9cf0d8cc to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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