lib/utils/preparePipeline.js
function prepareRevPipeline (revPipeline, fwdPipeline, collection) {
  return (revPipeline)
    ? preparePipeline(revPipeline, collection)
    : fwdPipeline.map((fn) => (fn.rev) ? fn.rev : null).filter(Boolean)
}
function prepareRevPipeline (revPipeline, fwdPipeline, collection) {
  return (revPipeline)
    ? preparePipeline(revPipeline, collection)
    : fwdPipeline.map((fn) => (fn.rev) ? fn.rev : null).filter(Boolean)
}
Prepare reverse pipeline by either running the `revPipeline` through the
regular preparePipeline() or – if `revPipeline` is not set - pick `.rev()`
functions from the `fwdPipeline`.
@param {array} revPipeline - The reverse pipeline definition or undefined
@param {array} fwdPipeline - A pipeline to pick `.rev()` from (already prepared)
@param {Object} collection - Object with pipeline functions
@returns {array} Prepared reverse pipeline