Simplified function for matching data objects

Added in Select2 4.0.0. This method was added to make upgrading easier from earlier versions of Select2.

During the Select2 4.0.0 release, the matcher function was changed to allow for more complex matching of nested objects.

Key
matcher
Value
A function taking a search term and the data object text.
Adapter
oldMatcher

The custom matcher example provides a guide for how to use this in your own application. For those upgrading from older versions of Select2, you just need to wrap your old matcher with this function to maintain compatibility.