lib/bundleLocator.js
function (res, filter) {
        if (!filter || Object.keys(filter).length === 0) {
            return true;
        }
        var prop;
        for (prop in filter) {
            if ('extensions' === prop) {
                // sugar for users
                if ('string' === typeof filter.extensions) {
                    filter.extensions = filter.extensions.split(',');
                }
                if (!filter.extensions || filter.extensions.indexOf(res.ext) === -1) {
                    return false;
                }
            } else if ('types' === prop) {
                // sugar for users
                if ('string' === typeof filter.types) {
                    filter.types = filter.types.split(',');
                }
                if (!filter.types || filter.types.indexOf(res.type) === -1) {
                    return false;
                }
            } else {
                return false; // unknown filters should fail to pass
            }
        }
        return true;
    }
function (res, filter) {
        if (!filter || Object.keys(filter).length === 0) {
            return true;
        }
        var prop;
        for (prop in filter) {
            if ('extensions' === prop) {
                // sugar for users
                if ('string' === typeof filter.extensions) {
                    filter.extensions = filter.extensions.split(',');
                }
                if (!filter.extensions || filter.extensions.indexOf(res.ext) === -1) {
                    return false;
                }
            } else if ('types' === prop) {
                // sugar for users
                if ('string' === typeof filter.types) {
                    filter.types = filter.types.split(',');
                }
                if (!filter.types || filter.types.indexOf(res.type) === -1) {
                    return false;
                }
            } else {
                return false; // unknown filters should fail to pass
            }
        }
        return true;
    }
Determines whether a resource is filtered or not.
@private
@method _filterResource
@param {LocatorResource} res The resource to filter.
@param {object} filter The filter.
@return {boolean} Whether resource passes the filter.