UNPKG

conan

Version:

Barbarically simple framework for building deployment systems.

18 lines (13 loc) 386 B
import privateData from "incognito"; export default function after(existingStep, afterStep, parameters) { const _ = privateData(this); const foundStep = _.steps.find(step => { return step.handler === existingStep; }); const index = _.steps.indexOf(foundStep); const nextIndex = index + 1; _.steps.splice(nextIndex, 0, { handler: afterStep, parameters: parameters }); }