Open crystalfp opened 6 years ago
To put a trimmer first in the pipeline I have to do:
fullTextIndex = lunr(function() { this.use(lunr.multiLanguage("en", "it")); this.pipeline.after(this.pipeline._stack[0], MyImprovedTrimmer); }
The usual this.pipeline.add(MyImprovedTrimmer); works, but put my trimmer at the end of the pipeline.
this.pipeline.add(MyImprovedTrimmer);
It could be helpful to have added the function this.pipeline.prepend(func) that puts func first in the pipeline.
this.pipeline.prepend(func)
func
I think this would be a good addition to the pipeline interface, anyone interested in putting together a PR?
To put a trimmer first in the pipeline I have to do:
The usual
this.pipeline.add(MyImprovedTrimmer);
works, but put my trimmer at the end of the pipeline.It could be helpful to have added the function
this.pipeline.prepend(func)
that putsfunc
first in the pipeline.