Files
openfoodnetwork/app/assets/javascripts/darkswarm/services/matcher.js.coffee
2014-05-05 15:43:11 +10:00

6 lines
184 B
CoffeeScript

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