gmac / backbone.epoxy

Declarative data binding and computed models for Backbone
http://epoxyjs.org
MIT License
615 stars 89 forks source link

add 'equal' filter #117

Closed p2227 closed 8 years ago

p2227 commented 9 years ago

generally we have three value '1','2','3'. and we want to show page 2 but hide 1 and 3.it's easy to do it by this filter.

p2227 commented 9 years ago

ok,I got it. btw,is it needed to run uglify ?

gmac commented 8 years ago

Mind getting this mergable?

gmac commented 8 years ago

Sorry, got looking at the implementation and realized there's a lot more going on here than just asserting that two values are equal. With the three inputs and a polymorphic return value, this feeling highly specific, and therefore better implemented as a custom filter than a baseline feature of the library.

p2227 commented 8 years ago

so,you think that the implementation is too complex? a filter should do one thing and keep it as simple as possible?