javascript – Filter results by a search term

The below code filters my contacts according to a search term the user typed.

Is there a way I can make it dynamic?

  contacts = contacts.filter(
    contact =>
      contact.firstName.toLowerCase().includes(search) ||
      contact.lastName.toLowerCase().includes(search) ||
      contact.title.toLowerCase().includes(search) ||
      contact.type.toLowerCase().includes(search) ||
      contact.notes.toLowerCase().includes(search) ||
      contact.phones.filter(val =>
        val.value.toLowerCase().includes(search)
      ).length ||
      contact.emails.filter(val =>
        val.value.toLowerCase().includes(search)
      ).length
  )