Skip to content

Instantly share code, notes, and snippets.

@alashstein
Created September 5, 2018 06:28
Show Gist options
  • Save alashstein/d19cda03d20ad6aca6ff5a1a51509a9a to your computer and use it in GitHub Desktop.
Save alashstein/d19cda03d20ad6aca6ff5a1a51509a9a to your computer and use it in GitHub Desktop.
export const contains = ({ name, date, place }, query) => {
if (
name.toLowerCase().includes(query) ||
date.toLowerCase().includes(query) ||
place.toLowerCase().includes(query) ||
name.includes(query) ||
date.includes(query) ||
place.includes(query)
) {
return true
}
return false;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment