JavaScript · Intermediate · Ticket 7Ticket #25 · from Priya Raman, Product Manager
  1. Example
  2. Warm-up 1
  3. Warm-up 2
  4. Ticket
Brief
NEW TICKET#25 · Client search

Search that ignores accents and case

Priya Raman · Product Manager
Opened today

“Freelancers in Spain and Germany keep telling us search is broken: they type "jose" and José Martín doesn't come up, or "muller" and there's no Müller. Search should ignore accents and capital letters, both in what's typed and in the names. People also type more than one word, like "studio ana" for Ana's Design Studio, so a name matches when it contains every word typed, in any order. Spaces around or between the words don't matter, and an empty search shows everyone. Can you write searchClients?”

YOUR PLAN
  1. 1Watch an example2 min
  2. 2Warm-up 11 min
  3. 3Warm-up 21 min
  4. 4Fix the ticket16 min
BY THE END YOU CAN
  • Remove accents with normalize and a regular expression
  • Split a search into words
  • Check that every word matches with every()
About 20 minutes
Four short steps. Nothing is timed, and you can leave any time.