dist/assets/js/plugins/storeLocator/jquery.storelocator.js
function (data, filters) {
			this.writeDebug('filterData',arguments);
			var filterTest = true;

			for (var k in filters) {
				if (filters.hasOwnProperty(k)) {

					// Exclusive filtering
					if (this.settings.exclusiveFiltering === true || (this.settings.exclusiveTax !== null && Array.isArray(this.settings.exclusiveTax) && this.settings.exclusiveTax.indexOf(k) !== -1)) {
						var filterTests = filters[k];
						var exclusiveTest = [];

						if (typeof data[k] !== 'undefined') {
							for (var l = 0; l < filterTests.length; l++) {
								exclusiveTest[l] = new RegExp(filterTests[l], 'i').test(data[k].replace(/([^\x00-\x7F]|[.*+?^=!:${}()|\[\]\/\\]|&\s+)/g, ''));
							}
						}

						if (exclusiveTest.indexOf(true) === -1) {
							filterTest = false;
						}
					}
					// Inclusive filtering
					else {
						if (typeof data[k] === 'undefined' || !(new RegExp(filters[k].join(''), 'i').test(data[k].replace(/([^\x00-\x7F]|[.*+?^=!:${}()|\[\]\/\\]|&\s+)/g, '')))) {
							filterTest = false;
						}
					}
				}
			}

			if (filterTest) {
				return true;
			}
		}
function (data, filters) {
			this.writeDebug('filterData',arguments);
			var filterTest = true;

			for (var k in filters) {
				if (filters.hasOwnProperty(k)) {

					// Exclusive filtering
					if (this.settings.exclusiveFiltering === true || (this.settings.exclusiveTax !== null && Array.isArray(this.settings.exclusiveTax) && this.settings.exclusiveTax.indexOf(k) !== -1)) {
						var filterTests = filters[k];
						var exclusiveTest = [];

						if (typeof data[k] !== 'undefined') {
							for (var l = 0; l < filterTests.length; l++) {
								exclusiveTest[l] = new RegExp(filterTests[l], 'i').test(data[k].replace(/([^\x00-\x7F]|[.*+?^=!:${}()|\[\]\/\\]|&\s+)/g, ''));
							}
						}

						if (exclusiveTest.indexOf(true) === -1) {
							filterTest = false;
						}
					}
					// Inclusive filtering
					else {
						if (typeof data[k] === 'undefined' || !(new RegExp(filters[k].join(''), 'i').test(data[k].replace(/([^\x00-\x7F]|[.*+?^=!:${}()|\[\]\/\\]|&\s+)/g, '')))) {
							filterTest = false;
						}
					}
				}
			}

			if (filterTest) {
				return true;
			}
		}
function ( data , filters ) { this . writeDebug ( 'filterData' , arguments ) ; var filterTest = true ; for ( var k in filters ) { if ( filters . hasOwnProperty ( k ) ) { // Exclusive filtering if ( this . settings . exclusiveFiltering === true || ( this . settings . exclusiveTax !== null && Array . isArray ( this . settings . exclusiveTax ) && this . settings . exclusiveTax . indexOf ( k ) !== - 1 ) ) { var filterTests = filters [ k ] ; var exclusiveTest = [ ] ; if ( typeof data [ k ] !== 'undefined' ) { for ( var l = 0 ; l < filterTests . length ; l ++ ) { exclusiveTest [ l ] = new RegExp ( filterTests [ l ] , 'i' ) . test ( data [ k ] . replace ( / ([^\x00-\x7F]|[.*+?^=!:${}()|\[\]\/\\]|&\s+) / g , '' ) ) ; } } if ( exclusiveTest . indexOf ( true ) === - 1 ) { filterTest = false ; } } // Inclusive filtering else { if ( typeof data [ k ] === 'undefined' || ! ( new RegExp ( filters [ k ] . join ( '' ) , 'i' ) . test ( data [ k ] . replace ( / ([^\x00-\x7F]|[.*+?^=!:${}()|\[\]\/\\]|&\s+) / g , '' ) ) ) ) { filterTest = false ; } } } } if ( filterTest ) { return true ; } }
Filter the data with Regex

@param data {array} data array to check for filter values
@param filters {Object} taxonomy filters object
@returns {boolean}
Filter the data with Regex