Source:event-icon.filter.js

(function () {
    'use strict';
    // Event Icon
    angular
        .module('mohistory')
        .filter('eventIcon', eventIcon);
    /**
     * Determine what thumbnail to use for a given event icon name.
     * @memberof mohistory
     * @name eventIcon
     * @ngdoc filter
     */
    function eventIcon() {
        var iconHash = {
            'Free program': 'img/event-icons/free-program',
            'Registration required': 'img/event-icons/registration',
            'Paid program': 'img/event-icons/paid-program',
            'Program with member benefits': 'img/event-icons/member-benefits',
            'Accessible program': 'img/event-icons/accessible',
        }
        return function (iconName) {
            var guess = iconHash[iconName];
            if (guess) {
                return guess;
            }
        }
    }
})();