1(function () { 2 'use strict'; 3 4 var app = angular.module('app'); 5 6 app.filter('filterByDisplayCategory', function () { 7 8 return function (products, currentDisplayCategory) { 9 10 return (products || []).filter(function (product) { 11 12 if (typeof currentDisplayCategory === 'undefined' || currentDisplayCategory === null) { //if no cats, show all product. Likely will be used from search 13 return true; 14 } 15 16 var hasDisplayCategory = function (displayCategory) { 17 return displayCategory.displayCategoryID == parseInt(currentDisplayCategory, 10); 18 } 19 20 if (product != null && product.displayCategories != null && product.displayCategories.length > 0) { 21 return product.displayCategories.some(hasDisplayCategory) 22 } 23 24 return false; 25 }); 26 }; 27 }); 28})();
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.