code: function() {
      if (this.props.search instanceof RegExp) {
        return this.props.search;
      }
  
      var flags = '';
      if (!this.props.caseSensitive) {
        flags +='i';
      }
  
      var search = this.props.search;
      if (typeof this.props.search === 'string') {
        search = escapeStringRegexp(search);
      }
  
      if (this.props.ignoreDiacritics) {
        search = removeDiacritics(search, this.props.diacriticsBlacklist);
      }
  
      return new RegExp(search, flags);
    }
docs: Get the search prop, but always in the form of a regular expression. Use
  this as a proxy to this.props.search for consistency.
  
  @return {RegExp}