UNPKG

@servable/server

Version:
19 lines (17 loc) 342 B
export default async (props) => { const { operation, direction, taskProps } = props switch (direction) { case 'up': case 'down': { break } default: { return } } const { up, down, } = operation const task = (direction === 'up') ? up : down if (!task) { return } await task.default(taskProps) }