Files
openfoodnetwork/app/assets/javascripts/darkswarm/services/matcher.js.coffee
2014-07-29 11:33:25 +10:00

7 lines
206 B
CoffeeScript

Darkswarm.factory "Matcher", ->
new class Matcher
match: (properties, text)->
properties.some (prop)->
prop ||= ""
prop.toLowerCase().indexOf(text.toLowerCase()) != -1