removed unused function 'endsWithWildcard', fixes jshint error