"use strict";
/**
 * Match Referrer condition
 * @module
 */
var matchUrl = require('../match_url_helper');
/**
 * @type ConditionMatcher
 */
module.exports = {
    // specify the fields needed
    fieldsNeeded: ['referrer'],
    /**
     * @param {Object} value
     * @param {Condition} cond
     * @return {Boolean}
     */
    match: function (value, cond) {
        if (!value.referrer) {
            return false;
        }
        return matchUrl(value.referrer, cond);
    },
};
