openfoodfoundation/openfoodnetwork

View on GitHub
app/assets/javascripts/darkswarm/filters/properties_with_values_of.js.coffee

Summary

Maintainability
Test Coverage
angular.module('Darkswarm').filter 'propertiesWithValuesOf', ->
  (objects)->
    propertiesWithValues = {}
    for object in objects
      for property in object.properties_with_values
        propertiesWithValues[property.id] = property
    propertiesWithValues