before method

void before(
  1. PipelineFunction existingFn,
  2. PipelineFunction newFn
)

Implementation

void before(PipelineFunction existingFn, PipelineFunction newFn) {
  _warnIfFunctionNotRegistered(newFn);

  var pos = _stack.indexOf(existingFn);
  if (pos == -1) {
    throw Exception('Cannot find existingFn');
  }
  _stack.insert(pos, newFn);
}