addyosmani/backbone.paginator — pull request #130 by garakelian (2013-01-27 19:51:36+00:00)
Title: Add setFilterFunction method to allow custom filtering

It would be nice to be able to invoke a custom filter function, instead of using the built-in setFilter or setFieldFilter methods.

I'd suggest adding a setFilterFunction method that would be passed the list of models, and would return a list of models.

My particular use case is that I'd like to the quicksilver algorithm (https://github.com/boazsender/backbone.search/blob/master/src/backbone.search.js), and a setFilterFunction would make it trivially easy to add this feature.

Thanks for considering this pull request. I haven't written unit tests for Javascript before, so I haven't included those. Comments welcome.