Closed domoritz closed 5 years ago
@domoritz good point. The part of prefilter
in docs was quite confusing..
Answering questions:
prefilter
function gives you an access to indexed items so you can narrow it down in the custom way i.e. by using js filter or slice function. The prefilter
doesn't sound intuitively but no idea how to name it better.. I've added also now filter
function which is just responsible for filtering items the same way like in lodash or in native js Array.prototype.filter(). There is a chance filter
will cover most custom cases and prefilter
could be deleted in the future. Thank you so much for the prompt and comprehensive response. I am going to close this issue as solved.
I'm very confused by the prefiltering method and would appreciate your help and some improvements to the docs.
itemsjs.prefilter
is also not definedIt is making items prefiltering before search or aggregation, i.e.: